Compiler Error J0255

Expected #endif

The compiler detected a #if conditional compilation directive but did not find a matching #endif directive; however, the symbol used by the #if directive was defined. This error usually occurs when a #if conditional compilation directive is used but a matching #endif directive in not defined to close the conditional compilation block, and the code is intended to be compiled. Ensure that you have a matching #endif directive for the #if directive specified in the error and compile again.

The following example illustrates this error:

#define DEBUG

public class Simple{
   void method1(){
      #if DEBUG 
         System.out.println("Do something here");
   //error: '#endif' has not been specified for the '#if' directive
   }
}