aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Bit value for boolean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Bit value for boolean" Watch "Bit value for boolean" New topic
Author

Bit value for boolean

jbalaguru
Greenhorn

Joined: Oct 03, 2000
Posts: 2
boolean occupies 8bit or 1bit. pls expalin.
ricky gonzalez
Ranch Hand

Joined: Jun 30, 2000
Posts: 167
boolean only needs 1 bit, but Java allocates 8 bits for it.
Kishan Kumar
Ranch Hand

Joined: Sep 26, 2000
Posts: 130
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

------------------
Regards,
V. Kishan Kumar


Regards,<BR>V. Kishan Kumar
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Bit value for boolean
 
Similar Threads
WA #1.....word association
JTable type yes/no
why(boolean b3=true;)(Boolean b4=true;)is both right?
Hide and unhide panel
Return True