public class Test {
public static void main(String[] args) {
int i = 012;
System.out.println(i);
}
}
Why the output is : <
See the JLS:
An octal numeral consists of an ASCII digit 0 followed by one or more of the ASCII digits 0 through 7 interspersed with underscores, and can represent a positive, zero, or negative integer.
It's a good practice to write:
int i = 0_12;
It might be clearer now, i
in decimal is 2*80 + 1*81 = 10.