Compiler Error J0103

Cannot override final method 'identifier'

The compiler detected a class method attempting to override one of its base class methods, but the base class method was declared with the keyword final. Methods defined with the final modifier cannot be overridden by a derived class.

The following example illustrates this error:

public class Simple extends Simple2 {
   
   public void method1() {
      // error: ‘method1’ final in superclass
   }
}

class Simple2 {
   
   public final void method1() {
      // do something meaningful
   }
}