How to protect a class to be inherited ?

 

Answer : By adding a final keyword in before class name .

Example :
                                 Class final Class_name
                         {
Code will be here
}

Comments

Popular posts from this blog

Frequently asked: Vue.JS Interview Questions and Answers

Base URL Setting in Codeigniter

How To Secure Apache with Let's Encrypt on Ubuntu (Digital Ocean)