I have two classes defined like this:
class A {
public static String getName(){
Class c = getCalledClass();
return c.getSimpleName();
}
}
class B extends A {
//no methods are defined here!
}
I want to know if it is possible to compose the static method getCalledClass() such that calling A.getName() will return A and B.getName() will return B?
Thanks.