In my own project, this happened by accident, here is my modified small program.
I can not understand why it gives a conclusion of 10 ?
public class Int { public static void main(String args[]) { int j=012;
After that, I put two zeros, still outputting 10.
Then I change 012 to 0123 and now it gives 83?
Can anyone explain why?
java integer numbers literals
Codercroc
source share