This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes About boolean bit size 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 » Java » Beginning Java
Reply Bookmark "About boolean bit size" Watch "About boolean bit size" New topic
Author

About boolean bit size

Shakthi Anuradha
Greenhorn

Joined: Nov 16, 2004
Posts: 5
What is the bollean bit size. Someone says it is one bit.
In some fo books says it depend on the JVM.Tell me what is the ture.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

Hi,

Welcome to JavaRanch!

Sorry to tell you this, but it's entirely dependent on the JVM implementation.


[Jess in Action][AskingGoodQuestions]
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Generally, you should not care about the actual size, in memory, of a boolean. It has two usable values, true and false, but may take up more memory than is strictly required for that, depending on performance and alignment issues on the platform. But, as you can't do bit-wise operations on it anyway, you don't care.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
 
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: About boolean bit size
 
Similar Threads
basics
size of boolean
Hibernate Quick, but how quick???
what is size of char in java5?
size of boolean