There is no particular command to find of size of an object in java (like sizeof() operator of C/C++ ) but you can check Runtime r = Runtime.getRuntime() ;r.freeMemory() ;before and after the creation of the new Object.By subtraction u can get the used memory.