title: Benefits or uses for the Boolean.booleanValue function on Java?
body: <p>So, I've seen this line of code:</p>
  
  <pre><code>Boolean variable = false;
  /* ..stuff.. */
  if(variable.booleanValue() == false) {
  /* ..more stuff..*/
  }
  </code></pre>
  
  <p>And I've done, in a different place:</p>
  
  <pre><code>Boolean variable = false;
  /* ..my stuff..*/
  if(!variable) {
  /* ..more of my stuff..*/
  }
  </code></pre>
  
  <p>The question is: What is the difference/advantages of the first snippet of code over the first?</p>
  
  <p>The long version is: Given I can use the Boolean variable as a primitive (boolean) one, what's the point on doing variable.booleanValue() and even comparing it to a boolean value? Doesn't this also introduces the risk (on the code impossible, but hey) of a null pointer exception if variable is not initialised?</p>
  
  <p>There's any case in which is advisable using variable.booleanValue above just "variable"?</p>