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 purpose of the return statement?
Does java runtime require a license?
What is the difference between size and length in java?
What is overloading and overriding in java?
What is the use of jtable?
What happens if I remove static from main method?
Explain polymorphism citing an example.
Difference between final and effectively final ?
What is Java Annotations?
What is difference between java and java ee?
Explain the difference between jdk, jre, and jvm?
how to split string in java?
Explain throw keyword in java?
What is an infinite loop?
Explain importance of inheritance in java?