Compiler Error J0197

Cannot declare interface in inner class 'identifier'

The compiler detected an attempt to declare an interface inside an inner class. Inner class definitions do not support interfaces declared within them. Remove the interface declaration from within the inner class declaration and compile again.

The following example illustrates this error:

public class Simple{
   //Do something meaningful here
   class InnerClass{
   //Do something meaninful here
      interface MyInterface{
         /*error: interfaces cannot be declared
                  inside inner classes */
      }
   }
}