Compiler Error J0246

Invalid token on a # directive

The compiler detected an invalid token for a conditional compilation expression. This error usually occurs when a token is mistyped or the token used is not a legal token. Ensure that the conditional compilation directive specified in the error is correct and compile again.

The following example illustrates this error:

public class Simple{
   public void method1(){
      #iff DEBUG //error: 'iff' is not a valid token
        System.out.println("Do something meaningful here");
      #endif
   }
}