Compiler Error J0124

Operator cannot be applied to 'identifier' values

The compiler detected an operator being applied to a type it cannot be used with. Ensure that the operator you are attempting to use is valid for that type of variable or object and compile again.

The following example illustrates this error:

public class Simple {
   
   void method1(boolean b) {
   
      b++;
      /* error: post increment operator cannot
         be applied to boolean variables */
   }
}