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
Explain jvm, jre, and jdk?
What are the types of exceptions?
Can you inherit from an abstract class java?
What is ternary operator?
What are the different types of collections in java?
Can an integer be null java?
What is public static void main?
Does java allow default arguments?
What do you mean by mnemonics?
Are registers volatile?
What is a parameter used for?
How can we use primitive data types as objects?
Can we create a constructor in abstract class?
Explain the difference between map and flatmap stream operation?
Why use string handling in Java?