Size of an Object

How to find size of an object?

Questions by vmythilee

Showing Answers 1 - 2 of 2 Answers

rohodium

  • Sep 7th, 2010
 

As there is no predefined method in Java. We can use an indirect approach. We can calculate the memory of an object by taking the difference of the amount of memory used by the program before creating the object and after creaeting the object. The difference will give memory allocated for that object.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions