Compiles and runs fine on my machine too.
I guess you are not using any
IDE to run this. I copied the code into Eclipse and changed compiler compliance level. I can see that 1.6 and 1.5 work just fine, but setting it to 1.4 shows problem in Eclipse for Integer.