This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About boolean bit size" Watch "About boolean bit size" New topic

About boolean bit size

Shakthi Anuradha

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

Joined: Jul 08, 2003
Posts: 24183


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.
I agree. Here's the link:
subject: About boolean bit size
Similar Threads
size of boolean
what is size of char in java5?
size of boolean
Hibernate Quick, but how quick???