Compiler Error J0014

Expected ')'

The compiler expected to find a right parenthesis in the position indicated by the error message. This error usually occurs when the right parenthesis is accidentally omitted in any of the following situations:

The following example illustrates this error:

public class Simple {
   
   private int i;
   
   public void method1(int arg1, int arg2) {
   
      i = (arg1 < arg2 ? arg1 : arg2; 
      // error: ')' omitted
   }
}