As we all know that java uses the following data types
byte Occupy 8 bits in memory
short Occupy 16 bits in memory
int Occupy 32 bits in memory
long Occupy 64 bits in memory
If I create a class like
class Demo{
byte b;
int i;
long l;
}
Demo obj = new Demo();
Now my question is obj size is < or > or = the size of b+i+l which is 104 bytes. Please give me the clarification with proper reason.
Thanks,
Anil Kumar C