Also note that Integer is a class, so you are creating 1000 new instances of that class. That's not the same as 1000 ints (primitives) that would be just 4 bytes each

However, if you look at the class, the only non static member is an int, so, logically, it SHOULD only be 8 bytes, the object reference and the one member (and the object reference was already created by the creation of the array).

However, it probably never gets out of the young generation space and so there is probably a lot of "dead" space.

I believe that each and every instance has a minimum 8 byte fixed overhead and is aligned on an 8 byte boundary in the current Oracle JVMs (obviously this can and will vary with versions of the JVM). On that basis I would expect 16 bytes per instance.

Probably true. Not sure, was never ALL that interested. But, as I say, I believe the reason he sees about 180 per instance is simply because it never makes it out of young generation and so any "work" items from the for loop, etc, make up a bunch of "dead" space in the final "used" figure.

I tried this in NetBeans, latest Java 7. Just printed the allocation/1000. Ran it 100 times in a loop... I Got

memory used by allocation (k):1958
memory used by allocation (k):16
memory used by allocation (k):16
memory used by allocation (k):663
memory used by allocation (k):663
memory used by allocation (k):663
... the 663 same for the rest of the 100 iterations

I'm just going to add Java Garbage Collection to the long list of things I don't (need to?) understand!