Checking if an Object is null at the same time as a value of one of it's fields <p>Which of these would be correct?</p> <pre><code>if(dialog != null &amp;&amp; dialog.isShowing){} if(dialog.isShowing &amp;&amp; dialog != null){} if(dialog != null){ if(dialog.isShowing){} } </code></pre>