To prevent a specific method from being overridden in a subclass, use the final modifier on the method declaration, which means "this is the final implementation of this method", the end of its inheritance hierarchy.:to prevent a method from overriding,it must be qualified as final.
No comments:
Post a Comment