When we declare a class as final does it mean that we cannot create its subclasses or it cannot be the subclass of another class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

When we declare a class as final does it mean that we cannot create its subclasses or it cannot be the subclass of another class?

2nd Jan 2016, 12:13 PM
Shubham Jain
Shubham Jain - avatar
2 Answers
0
a final class cannot be extended by any other class, in other words a final class cannot have any subclass.
21st Jan 2016, 3:42 AM
Aikomo Oluwafisayo
0
We can not create its subclasses
23rd Oct 2016, 5:57 PM
Mansi Verma
Mansi Verma - avatar