title: Why is Java's boolean primitive size not defined?
body: <p>The <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#22909" rel="noreferrer">Java Virtual Machine Specification</a> says that there is limited support for boolean <strong>primitive</strong> types.</p>
  
  <blockquote>
    <p>There are no Java virtual machine instructions solely dedicated to operations on boolean values. Instead, expressions in the Java programming language that operate on boolean values are compiled to use values of the Java virtual machine int data type.</p>
  </blockquote>
  
  <p>The above implies (although I may have misinterpreted it) that the int data type is used when operating on booleans, but this is a 32 bit memory construct. Given that a boolean only represents 1 bit of information:</p>
  
  <ul>
  <li>Why is a byte, or short, type not used as the proxy for a boolean instead of int? </li>
  <li>For any given JVM what's the most reliable way of finding out exactly how much memory is used to store a boolean type? </li>
  </ul>