Compiler Error J0067

Cannot convert 'type' to 'type'

The compiler detected a variable type used out of its correct context. As such, the compiler could not implicitly convert the result to anything meaningful. Convert the value you are attempting to use to something the method or field definition requires and compile again.

The following example illustrates this error:

public class Simple {
   
   public void method1() {
   
      int i = 10;
   
      if (i--) { 
         // error: conditional needs expression
         // or boolean field
      }
   }
}