Compiler Error J0194

Class or interface cannot be declared 'volatile', 'native', 'transient', or 'synchronized'

The compiler detected that an inner class or interface was declared with one of the above mentioned modifiers. This error usually occurs when a method or field modifier is applied to an inner class or interface definition. Inner classes and interfaces can use the private, public, and protected access modifiers. Inner classes can also use modifiers such as abstract, static, and final.

The following example illustrates this error:

public class Simple{
   //Do something here
   volatile class InnerClass{
      /*error: like outer class, inner classes cannot be defined as
               volatile */
   }
}