Compiler Error J0132

Cannot declare a field to be 'identifier' and 'identifier'

The compiler detected the use of two or more incompatible modifiers in the declaration of a variable. This error usually occurs when a field has been defined with two access modifiers such as public and private. Ensure that the modifiers for the field do not conflict with each other and compile again.

The following example illustrates this error:

public class Simple {
   
   public private int i;
   // error: modifiers 'public' and 'private' 
   // cannot be combined in a declaration
}