Compiler Error J0247

#elif without matching #if

The compiler detected a #elif conditional compilation directive, but did not detect a matching #if directive. Ensure that you have a valid #if conditional compilation directive to match your #elif directive and compile again.

The following example illustrates this error:

public class Simple{
   public void method1(){
      //error: need to have '#if' before '#elif'
      #elif DEBUG
         System.out.println("Do something meaningful here");
      #endif
   }
}