Answers for "how to convert a char into digit"

1

convert char to single digit

char c = '1';
int i = c - '0'; // i is now equal to 1, not '1'
Posted by: Guest on May-28-2021
5

char to int

int n = Character.getNumericValue(char);
Posted by: Guest on December-07-2020

Code answers related to "how to convert a char into digit"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language