InterviewSolution
Saved Bookmarks
| 1. |
What are the Final class and Final methods? |
|
Answer» Final CLASS- A class that can’t be extended and inherited further is known as Final Class. This class is declared with the keyword final and should be declared. Final Method- METHODS in the final class are implicitly final and if a user uses the final keyword that means methods can’t be overridden by subclasses. Exampleclass childClassname extends parentClassname { public function __construct($AUTHOR, $pages) { final public function PageCount() { |
|