Final Class in Java

A final class is declared with a final class modifier and cannot be extended. This is done for reasons of security and efficiency. Accordingly, many of the Java standard library classes are final, for example, java.lang.System and java.lang.String. All methods in a final class are implicitly final. In short final class can never act as a base class but can be a subclass in inheritance.

Leave a Reply