BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. HTML5 Canvas
  2. Ruby
  3. iPhone/iPad
  4. Spring Web Flow
  5. REST
  1. jQuery Selectors
  2. Spring Config.
  3. Java
  4. Ajax
  5. Java Concurrency

Link Details

Link 738699 thumbnail
User 777925 avatar

By prashantdeva
via eblog.chrononsystems.com
Published: Feb 02 2012 / 13:55

Consider this piece of code which allocates a boolean array of 100,00. Considering that a boolean can just be either true or false, every element in the array only needs a single bit of space each. However as it turns out, when you allocate a boolean array, Java uses an entire byte for each element in the boolean array!
  • 9
  • 0
  • 836
  • 918

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)