title: Difference between OR operator || and | in Java?
body: <p>Can any one explain the difference between and usage of OR operator ( <code>||</code>  and <code>|</code> ) in java. thanks</p>
  <p>e.g:</p>
  <pre><code>if(a || b) {
  // Do something.
  }
  </code></pre>
  <p>and</p>
  <pre><code>if(a | b) {
  // Do something.
  }
  </code></pre>