How can we find size of the object ?
Answer Posted / m!r@
public class FindSizeOfObject{
public static void main(String[] args) throws Exception{
Runtime obj = Runtime.getRuntime();
System.out.println(obj.totalMemory() - obj.freeMemory());
}
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between throw and throws in java?
What is a local class in java?
What are data types in programming?
What do you know about the garbate collector?
Which is faster set or list in java?
Can a method be overloaded based on different return type but same argument type?
Explain about instanceof operator in java?
how is final different from finally and finalize in java?
How is Object Oriented Programming different from Procedure Oriented Programming?
What is sortedset in java?
What is a short in java?
Where pragma is used?
List types of storage classes in java?
What is unicode used for?
What is the final class?