Parsing String numbers
When parsing numbers residing in Strings one should pay attention to the parsing method.
There are several parsing methods in the Integer Class, and not all of them parse the numbers in a Decimal (Base 10) order.
For example if you'll try running the following line of code - an exception will be thrown: Integer i = Integer.decode("09");
The exception will be thrown due to the simple fact that there is no numeric character 09 when you use an Octalic counting base (Which is the decode method's default).
Try using a different method for a Decimal based number.
So, in order to correct our specific example we should use: Integer i = Integer.parseInt("09");