I understand that radix for the function Integer.parseInt()
is the base to convert the string into. Shouldn't 11 base 10 converted with a radix/base 16 be a B
instead of 17
?
The following code prints 17 according to the textbook:
public class Test {
public static void main(String[] args) {
System.out.println( Integer.parseInt("11", 16) );
}
}
"11"
in base-16. i.e. 1*16 + 1. – Colorless