0

Is it possible to construct empty class in java? If possible that what is the size of class?

Classes in java

5th Aug 2020, 5:26 PM
Rushikesh Kate
Rushikesh Kate - avatar
2 Respostas
+ 1
Yes it is possible to construct an empty class in Java and it will compile successfully. The JVM does not want you to know how all the memory is managed internally so that you can focus more on the business logic. So I do not think that you will be able find the size of an empty class.
5th Aug 2020, 7:24 PM
Avinesh
Avinesh - avatar