title: Bit wise operators not working properly in java
body: <p>I tried running the below program but its not working properly.
  Please help me.</p>
  
  <pre><code>package javaapplication2;
  public class Fun {
  public static void main(String args[]) {
      int var1 = 3;
      int var2 = 2;
      int var3 = var1 &amp; var2;
      System.out.println(var3);
     }
  }
  </code></pre>
  
  <p>I got this error when i tried running in NetBeans:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.RuntimeException:<br>
    Uncompilable source code - bad operand types for binary operator '&amp;'<br>
      first type:  int<br>
      second type: boolean<br>
        at javaapplication2.JavaApplication2.main(JavaApplication2.java:25)<br>
      Java Result: 1</p>
  </blockquote>