When strings are mixed with numeric values, they will turn numeric values to characters. I am wondering is it possible for the opposite way to happen: a string literal is turned into numeric values (Ex: the string "123456" turn into the number 123456) ?
Indeed there is! You can convert a String into an int like this:
String
int
String numberText = "123456"; int number = Integer.parseInt(numberText);
Or there's another way:
int number = Integer.valueOf(numberText);
If you assign them as variables.