title: if Statment is executed if variable is null
body: <p>Why is if executed if the user is null?</p>
  
  <p>System out user = null</p>
  
  <pre><code>    HttpSession session = request.getSession(false);
  
      if (session != null) {
          String user = (String) session.getAttribute("user");
          System.out.println(user);
      } else {
          System.out.println("Falscher Benutzer oder Passwort");
      }
  </code></pre>