title: Type mismatch: cannot convert from long to int
body: <p>I had the following lines of code</p>
  
  <pre><code>long longnum = 555L;
  int intnum = 5;
  intnum+=longnum;
  intnum= intnum+longnum; //Type mismatch: cannot convert from long to int
  System.out.println("value of intnum is: "+intnum);
  </code></pre>
  
  <p>I think line-3 and line-4 do same task, 
  then why compiler showing error on line-4 "Type mismatch: cannot convert from long to int"</p>
  
  <p>please help.</p>