final class & final methods

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 25 06:24:36 PDT 2015


On Friday, 25 September 2015 at 10:28:56 UTC, ref2401 wrote:
> If I declare a class as `final` do I  have to mark all methods 
> of the class as `final` too?

A final class can't be subclassed, so none of its methods can be 
overridden anyway.


More information about the Digitalmars-d-learn mailing list