+ 2
Int Java question
I don't understand why when I print the variable A the output is 8. int A = 010; System.out.print(A); //output is 8
1 Answer
+ 8
The zero prefix for the number indicates that it is a number in octal (base 8), 10 in octal is 8 in decimal (base 10)