Is it possible to restrict Inheritance in Java?
- Team ATC
- Sep 26, 2020
- 1 min read
Random Post | #AskTheCode
Yes, it is. You can restrict Inheritance by:
a. Using the final keyword.
b. Making the method final.
c. Using private constructor.
d. Using (//) Javadoc comment.
Komentar