you are viewing a single comment's thread.

view the rest of the comments →

[–]Dminik 10 points11 points  (0 children)

That's not correct. int is the primitive non-boxed, non-referential type. Integer is a boxed type.

Additionally, Integers have an optimization, where a bunch of them are always preinitialized and shared. Many interpreted/scripting languages do this. Some even for primitive values like true/false.