You are viewing a single comment's thread. Return to all comments →
You may write whatsYourName() implementation only once:
whatsYourName()
class Flower { String whatsYourName() { return getClass().getSimpleName(); } } class Jasmine extends Flower { } class Lily extends Flower { } class Lotus extends Flower { } ...
Covariant Return Types
You are viewing a single comment's thread. Return to all comments →
You may write
whatsYourName()
implementation only once: