+ 1
Why is an abstract class implementing a function
From what I have learnt abstract classes only declare a class without implementing them. But the abstract class is implementing the function. https://code.sololearn.com/cCPyZpwkWBM2/?ref=app https://code.sololearn.com/cCPyZpwkWBM2/?ref=app
2 Réponses
+ 5
it has functions because all the subclasses inherit them, but it is abstract so you only use the methods with the subclasses
0
This seems to be common misconception. Classes with abstract methods must be abstract. But you can declare a class abstract, even if it does not include abstract methods. I have no idea, why do many people get that wrong. Just look at class Math.