Final Classes : Final Class « Class Definition « Java Tutorial






You can prevent others from extending your class by making it final using the keyword final in the class declaration.

final class FinalClass{


}








5.26.Final Class
5.26.1.Final Classes
5.26.2.Using final to Prevent Overriding