The Final Keyword Is Used To Declare That A Method Or Class Cannot Be Overridden By A Subclass

<?
    class Dog {
            private $Name;
            private $DogTag;
            final public function bark( ) {
                    print "Woof!\n";
            }
    }
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.