Each of Java's eight primitives has an immutable object wrapper class—Integer for int, Double for double, Boolean for boolean—needed whenever data enters generic collections or nullable fields. Java boxes and unboxes them automatically, yet two subtle traps (cache boundaries and null unboxing) trip up beginners regularly.
More lessons in Complete Core Java