1.

How Can We Restrict Inheritance For A Class?

Answer»

We can RESTRICT inheritance for class by following steps.
1. By USING final keyword
2. If we make all method final, then we cannot OVERRIDE that.
3. By using PRIVATE constructors
4. By using Javadoc COMMENT (//)

We can restrict inheritance for class by following steps.
1. By using final keyword
2. If we make all method final, then we cannot override that.
3. By using private constructors
4. By using Javadoc comment (//)



Discussion

No Comment Found