Ok, well there is the problem: Java 1.4.2
Auto-boxing was introduced in 1.5. Without auto-boxing, the compiler doesn't convert primitive variables to their object wrappers, like Integer, automatically. You have to create those object instances yourself: new Integer(yourInt)
Java 1.5 was officially at End-of-life status in 2009. You (meaning your class most likely) need to use a version of Java that is still supported. There is absolutely no reason at all to still be teaching students with anything prior to Java 1.5. Java 6.0 has been out since 2005.