79605767

Date: 2025-05-04 15:43:42
Score: 2
Natty:
Report link

Since my reputation is too low as answer which should only be a comment...

Generics would help to achieve subclass to have more specific parameters as follows:

You could write a generic PersonHelper

public abstract class PersonHelper<T extends Person> {
    public abstract Person getPerson(T p);
}

Therefore you could have a ChildHelper with Child as param:

public abstract class ChildHelper<T extends Child> {
    public abstract Child getPerson(T p);
}
Reasons:
  • RegEx Blacklisted phrase (1.5): reputation
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: CopyPaste