title: In Java, why the output of int a=('a'+'b'+'c'); are different form System.out.println('a'+'b'+'c'+"")
body: <p>the original question is like this.</p>
  
  <pre><code>public class test {
      public static void main(String[] args){
          int i = '1' + '2' + '3' + "";
          System.out.println(i);
      }
  }
  </code></pre>
  
  <p>and this gives me an error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      Type mismatch: cannot convert from String to int
  </code></pre>
  
  <p>then I changed the code like this:</p>
  
  <pre><code>public class test {
      public static void main(String[] args){
          int i = '1' + '2' + '3';
          System.out.println(i);
      }
  }
  </code></pre>
  
  <p>the out put is 150.</p>
  
  <p>but when I write my code like this:</p>
  
  <pre><code>public class test {
      public static void main(String[] args){
          System.out.println('a'+'b'+'c'+"");
      }
  }
  </code></pre>
  
  <p>the output become 294.</p>
  
  <p>I wonder why.</p>