Matthew Brown wrote:It's working as I'd expect it to. What output were you expecting?
Well, in fact I was expecting
MyClass2 to get the updation
MyClass did. My goal is to have a common variable (a common state) that all subclasses can use and in turn add their own. Suppose that instead of
cadena being a simple
String attribute it's a Map. This Map is populated by the abstract class (
MyAbstractClass) with some initial keys. Then as the application progresses the subclasses use existing keys and add new ones.