inheritance - Is there any annotation to warn that subclasses shouldn't hide a static method in Java -
i have class contains public static method in java. there annotation in java warn subclasses not use same method signature(and thereby hide superclass method). other workarounds fine.
just make superclass method final
:
class foo { public static final void go() {} } class bar extends foo { public static void go() {}; // error }
Comments
Post a Comment