Compiler Error J0048

Cannot extend final class 'identifier'

The compiler detected an attempt to subclass a class declared with the keyword final. Classes declared as final cannot be subclassed.

The following example illustrates this error:

final class Simple2 {
   
   // do something meaningful
   
}

public class Simple extends Simple2 {
   
   // error: cannot extend ‘Simple2’
   
}