I have a singleton class, call Class A, then I have another class, called Class B, and Class B extends from class A. What I want is that, after instance of class A is created, when the instance of class B is created after that, it will have the same information as class A have. Is it possible in Java ?
Thank you very much.
P/S: This is how I created a singleton class
public static A getInstance() {
if (instance == null) {
instance = new A();
}
return instance;
}