What is a final class in OOP?

Object Oriented Programming Questions



47 Short 36 Medium 25 Long Answer Questions Question Index

What is a final class in OOP?

A final class in Object Oriented Programming (OOP) is a class that cannot be inherited or extended by any other class. It is the last level of inheritance hierarchy and cannot have any subclasses. The final keyword is used to declare a class as final. This is often done to prevent any modifications or extensions to the class, ensuring that its implementation remains unchanged.