My friends and I have puzzled over this statement in Java after seeing it and the answer. How does this work?
System.out.printf("%d", 077);
equals 63?
077 is an octal number which equals 7 x 81 + 7 x 80 which is 63 decimal. To display the octal value you could do
077
63
System.out.printf("%o", 077);
1.4m articles
1.4m replys
5 comments
57.0k users