Was asked this question recently and did not know the answer. From a high level can someone explain how Java takes a character / String and convert it into an int.
M
result = 0
( int j=maxSize, i =0 ; j > 0; j--, i++)
int digit = Character.digit(s.charAt(i))
result= result + digit * (10 power j-1)