Q1: If my computer has 32-bit processor, how does long
type which is 64-bit be stored and used for processing?
On the other hand, if I am using only int
types in my 64-bit processor, am I not wasting 32-bits of memory?
Q2: For primitives, we say byte
is 8-bit, int
is 32-bit. How do we say the same for objects? Is there a way to get the size of objects in Java. or what is the maximum size an object can be?