title: What is the purpose of `boolean` type in JVM?
body: <p>As it <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.3.4" rel="noreferrer">said</a> in <code>JVMS8</code>:</p>
  
  <blockquote>
    <p>Although the Java Virtual Machine defines a boolean type, it only provides
    very limited support for it. 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>Indeed, these two methods:</p>
  
  <pre><code>boolean expr1(boolean a, boolean b) {
      return a || b;
  }
  
  int expr2(int a, int b) {
      return ((a != 0) || (b != 0)) ? 1 : 0;
  }
  </code></pre>
  
  <p>will produce same byte code (except method signature)</p>
  
  <pre><code>  boolean expr1(boolean, boolean);
      Signature: (ZZ)Z
      Code:
         0: iload_1       
         1: ifne          8
         4: iload_2       
         5: ifeq          12
         8: iconst_1      
         9: goto          13
        12: iconst_0      
        13: ireturn       
  
    int expr2(int, int);
      Signature: (II)I
      Code:
         0: iload_1       
         1: ifne          8
         4: iload_2       
         5: ifeq          12
         8: iconst_1      
         9: goto          13
        12: iconst_0      
        13: ireturn       
  </code></pre>
  
  <p>So, I do not understand why does <code>JVM</code> need <code>boolean</code> type nevertheless? Just for runtime check of method signatures?</p>