title: Why does my if condition not accept an integer in java?
body: <p>Currently I'm using:</p>
  
  <pre><code> int a=10;
   if(a=20)
       printf("TRUE");
   else
       printf("false");
  </code></pre>
  
  <p>Which prints, in C, the value <code>TRUE</code>.</p>
  
  <p>But in case of java:</p>
  
  <pre><code>int a=10;
  if(a=20)
      System.out.println("TRUE");
  else
      System.out.println("FALSE");
  </code></pre>
  
  <p>I'll get a compile time error about an incompatible type.</p>