getline to int code example
Example 1: char to int
int n = Character.getNumericValue(char);
Example 2: java convert char to int
char something = '1';
int value = Integer.parseInt(something + "");
System.out.println(value); // prints 1
int n = Character.getNumericValue(char);
char something = '1';
int value = Integer.parseInt(something + "");
System.out.println(value); // prints 1