boolean only needs 1 bit, but Java allocates 8 bits for it.
Joined: Sep 26, 2000
Hi, Another small addition, It is made ot occupy 8 bits though it requires only one bit because an individual bit is not addressable. the small unit of memory that is addressable is a byte which is a stream of 8 bits.That is why a boolean needs 8 bits. Hope this helps