Aryan PrajapatKnowledge Contributor
What do the terms "final class" and "final method" mean in php?
What do the terms "final class" and "final method" mean in php?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
The final keyword in a method declaration implies that subclasses will not be able to override the method. It is not possible to subclass a class that has been declared final. This is especially handy when designing immutable classes, such as the String class. Only classes and methods can be declared final; properties cannot be declared final.