954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

What is the size of a boolean variable

Hi,

Can anyone please tell whats the size of a boolean variable declared in Java?

aripaka
Light Poster
36 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

There is no need to know. A boolean is a boolean is a boolean. How it's defined internally is inconsequential to the person using the datatype.
It could even be different on different JVMs, so counting on a particular implementation is dangerous.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You