An integer literal consisting of a leading 0 digit followed by one or more digits in the range 0-7 is an octal literal. This can lead to two problems:

To avoid these problems:

  • J. Bloch and N. Gafter, Java Puzzlers: Traps, Pitfalls, and Corner Cases, Puzzle 59. Addison-Wesley, 2005.
  • Java Language Specification: Integer Literals.