title: Will this create NullPointerException , if not why not?
body: <p>I have this below lines of code </p>
  
  <pre><code>String name = null;
  if (something)
      name = someString;
  if (name != null &amp;&amp; name.equals("XYZ"))
      doSomethingWith ("hello");
  </code></pre>
  
  <p>Will the above if condition result in NullPointerException , if "something" is false ?
  if not why not ?</p>