Interface data members cannot be declared 'transient', 'volatile', 'private', or 'protected'
The compiler detected one of the modifiers shown above used in the declaration of an interface member variable. Because interfaces are public and cannot be instantiated, these modifiers are not applicable and should be used with classes only.
The following example illustrates this error:
interface Simple {
volatile int i = 1;
// error: 'volatile'cannot be used
}