If you are only looking for a variant then how the following -
public String method(Number n) throws RuntimeException
or,
public <T extends Number> String method(T n) throws RuntimeException
Also, the other that don't apply in case of String
, because it's final, is that the overriding methods are allowed return a subtype of return type in the parent.