Hi friends,
I want to know that, a class implements two interfaces each containing three methods. The class contains no instance data. Anyone like to tell me what will be the size of the object created from this class?
Size of the object
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Dec 10, 2011, 12:36 AM EST
Pankaj RanaRank #2,270 · 620 reputationPosted Dec 10, 2011, 1:44 AM EST
VulpesRank #55 · 29.2K reputationPosted Dec 10, 2011, 1:55 AM EST
Every instance of an object requires 8 bytes (32 bit) or 16 bytes (64 bit) of overhead.
Even if there are no instance fields it also needs an additional byte as a marker. In practice, to maintain alignment, 4 or 8 bytes will be allocated instead of one.