I have the following class:
public abstract class A { public abstract String doSomething(String X, String Y); public static String doSomething(String X, String Y){return X + Y;} ... } The issue I have is that the static and abstract doSomething() methods seem to clash as duplicates. I thought this should be fine because the static method belongs to the class, not an instance of the class, so I was going to use the abstract method to enforce the method on all subclasses and the static method as a helper so that I have nicely factored code.
I know I could probably add an interface into the mix, but I don't really understand what's wrong with my abstract and static methods existing on the same class. What's wrong with this?