I just start out with an example, that explains it best:
public abstract class A{
static String str;
}
public class B extends A{
public B(){
Put the static varibale in each subclass and add a (not static) abstract method to the abstract superclass:
abstract String getStr();
Then implement the getStr() method in each subclass by returning the static field of this special subclass.
public class B extends A {
private static String str;
@Override
public String getStr() {
return B.str;
}
}