often used to enforce the API functionality of a method.
class SomeClass{
public final void finalMethod() {
System.out.println("One thing.");
}
}
It's legal to extend SuperClass, since the class isn't marked final, but we can't
override the final method finalMethod()
No comments:
Post a Comment