title: Unexpected Identifier Expected Error
body: <p>I am a competitive C++ programmer who recently started to learn Java. 
  I tried writing a program for problem 556A on Codeforces (an easy problem) to practice, but came across an &lt;identifier> expected problem, even though the code was short and nothing was outside of the "main" function. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>import java.util.Scanner;
  
  class 556A {
  
      public static void main(String[] args){
  
          Scanner s = new Scanner( System.in );
          int len;
          len=s.next();
          char in;
          int n0=0;
          int n1=0;
  
          for (int i=0; i&lt;len; i++){
              in=s.next();
              if (in=='0') n0++;
              else n1++;
          }
          int x=abs(n0-n1);
          System.out.println(x);
      }
  }
  </code></pre>