title: Default Boolean value in Java
body: <p>I just want to know if there is a difference in Java between:</p>
  
  <pre><code>private boolean someValue;
  
  private boolean someValue = false;
  </code></pre>
  
  <p>The second line maybe is just a time wasting?</p>
  
  <p><strong>EDIT (SUMMARY):</strong></p>
  
  <p>From the answers I found that there is almost no difference, but:</p>
  
  <blockquote>
    <p><em>"Relying on such default values, however, is generally considered bad programming style."</em></p>
  </blockquote>
  
  <p>But there are some strong arguments not to do so - see accepted answer below.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I found that in some cases <code>boolean</code> value <strong>must be</strong> initialized, otherwise the code <strong>will not compile</strong>:</p>
  
  <pre><code>boolean someValue;
  if (someValue) { // Error here
       // Do something
  }
  </code></pre>
  
  <p>In my NetBeans IDE I got the error - <em>"variable someValue might not have been initialized"</em>.</p>
  
  <p>It's getting interesting.. :)</p>