Compiler Error J0062

Attempt to reduce access level of member 'identifier'

The compiler detected an overridden method in the class being compiled that reduces the access level of its base class method. The base class access modifier for a method must be maintained by all derived classes that wish to overload the method.

The following example illustrates this error:

public class Simple{
   public void method1(){
      //Do something here
   }
}

class Simple2 extends Simple{
   private void method1(){
      /*error: cannot change access level of a method
      when overriding a base class's method. */
   }
}