title: Boolean expression order of evaluation in Java?
body: <p>Suppose I have the following expression</p>
  
  <pre><code>String myString = getStringFromSomeExternalSource();
  if (myString != null &amp;&amp; myString.trim().length() != 0) {
  ...
  }
  </code></pre>
  
  <p>Eclipse warns me that <code>myString</code> might be null in the second phrase of the boolean expression. However, I know some that some compilers will exit the boolean expression entirely if the first condition fails. Is this true with Java? Or is the order of evaluation not guaranteed?</p>