Check out example codes for "java convert char to int". It will help you in understanding the concepts better.

Code Example 1

char charValue = '2';
int intValue = Character.getNumericValue(charValue); // 2

Code Example 2

char something = '1';
int value = Integer.parseInt(something + "");
System.out.println(value);  // prints 1

Learn ReactJs, React Native from akashmittal.com