How can we find out the size of a java object??
Example:
class Person{ String name; int age; public Person(String n, int a){
You can use the sizeof4j library to calculate the size of any object in java like SizeOf.shallowSize(new Integer(2))
SizeOf.shallowSize(new Integer(2))