I was wondering if there is a difference in the memory occupied by
Integer n, and int n.
I know int n occupies 4 bytes normal
In general, the heap memory used by a Java object in Hotspot consists of:
as per the suggestion of Mark Peters I would like add the link below http://www.javamex.com/tutorials/memory/object_memory_usage.shtml