+ 1
How can a final class be a super class if it cannot be inherited according to the definition?
I just got this question in a quiz. 'Can a final class be a super class? ' my answer was false which was given wrong. Can anyone explain please?
2 odpowiedzi
+ 2
I believe that final classes (or subcomponents there of) are an indication that you can't override the existing features. So a class which inherits from a final class can expand the functionality, but not alter the base class definitions.
Take this with a grain of salt, however, I've had a ton of keywords poured into my head these past few weeks.
+ 1
IMO that quiz was wrong. You cannot extend from a final class. You can only wrap it.