• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

memory spacereserved by boolean data type

 
Jalees Ahmed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please tell me the size reserved by boolean variable in the memory.
Like int take 4 bytes,char take 2 bytes,etc.
Thanks in advance....
 
Eric Daly
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taken from Sun's Java Tutorial:

boolean: The boolean data type has only two possible values: true and false. Use this data type for simple flags that track true/false conditions. This data type represents one bit of information, but its "size" isn't something that's precisely defined.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its JVM specific. Not defined
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic