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
can any body body expalin best definitions & best real time exaples for opps concepts.
What is boolean used for?
What is nested class?
Can abstract class have private constructor?
What do you mean by an object in java?
What is defined as false sharing in the context of multithreading?
Can we inherit inner class?
How define set in java?
Explain the reason behind ending a program with a system.exit(0)?
What is private static class in java?
What is byte data type?
What are the two types of java programming?
What’s the difference between unit, integration and functional testing?
How do you start a new line in java?
What's the base class in java from which all classes are derived?