public class Test { public static void main(String[] args) { int i = 012; System.out.println(i); } }
Why the output is : <
012 is the octal value for 10 in decimal. So your telling java to print the integer at octal pos 012. Here: http://www.asciitable.com/ shows octal to decimal vaulue conversions.