title: What is the difference between & and && in if statement in java?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5564410/difference-in-and">Difference in &amp; and &amp;&amp;</a>  </p>
  </blockquote>
  
  
  
  <pre><code>if (true &amp;&amp; true) {
      System.out.println("test if");
  }
  
  if (true &amp; true) {
      System.out.println("test if");
  }
  </code></pre>
  
  <p>both are give same output.why ?</p>