title: Multiple logical expressions in one if statement in java
body: <p>Hi I have this example:</p>
  
  <pre><code>  (1)
    if(false &amp;&amp; false ||true){
              System.out.println("a");
    }
  </code></pre>
  
  <p><strong>result:</strong></p>
  
  <pre><code>a
  </code></pre>
  
  <p>and </p>
  
  <pre><code>  (2)
    if(false &amp;&amp; false | true){
              System.out.println("a");
    }
  </code></pre>
  
  <p><strong>result:</strong></p>
  
  <pre><code>(empty)
  </code></pre>
  
  <p>In case (1) we have short-circuit OR , but in the second we have long-circuit OR. From where comes the difference in the behavior? I know that the expression is evaluated from left to right and AND have bigger priority than OR, so I can't figure out why this happens in case 2?</p>