A final class is a Java class which cannot be extended. This means that a final class can not become a superclass nor have a subclass.

An example final class is written below:

 final class MySecureClass {
   // This class cannot be extended
}