As have been already told to you, integer literals starting with zero are considered having
octal
base (and, you know, allowed digit of octal base are
{0,1,2,3,4,5,6,7}
). If you need to add the
decimal
9
to the ArrayList then you have to remove the heading '
0
', that is change from
Quote:
al.add(new Integer(09));
to
al.add(new Integer(9));