finalをつけたクラスはextendsできない
final public class SampleFinalClass {
int i;
void method(){};
}
public class SampleSubClass extends SampleFinalClass {
int i;
}
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project mavenproject1: Compilation failure
com/mycompany/mavenproject1/SampleSubClass.java:[11,37] final com.mycompany.mavenproject1.SampleFinalClassからは継承できません