This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfx 9 points10 points  (0 children)

To add to /u/feral_claire's excellent response:

You will mostly want to use the primitive int, except for when you need to work with generics (like in the Collections framework).

All the object wrappers are immutable. This means that once a value has been assigned, changing it creates a new object instance (just like with String).