Compiler Error J0012

Expected ';'

The compiler expected to find a semicolon in the position indicated by the error message. This error usually occurs when the semicolon is accidentally omitted from the end of a statement. It can also occur when a conditional expression is not syntactically correct. This error is often caused on the line previous to the line the compiler has reported the error on. Ensure that semicolons are used properly and compile again.

The following example illustrates this error:

public class Simple {
   
   private static int x = 10 // error: ';' omitted
   
   public void method1(int arg1) {
   
      for (int i = 1; i < x i++) { 
         // error: ';' omitted
      }
   }
}