title: What the difference between Boolean.TRUE and true
body: <p>Firstly, I have </p>
  
  <pre><code>private Map&lt;String, Boolean&gt; mem = new HashMap&lt;String, Boolean&gt;();
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>  if (wordDict.contains(s) ||  Boolean.TRUE==mem.get(s)) {
          return true;
      }
  </code></pre>
  
  <p>why can't I use "mem.get(s)==true" in the if statement. There will be a error "Line 6: java.lang.NullPointerException"</p>
  
  <p>I think I still cannot understant wrapper class well. Please give me some guidance. Thank you!</p>