If the java class, say classA, extends classB, it cannot extend Observable. But if the function setChanged()was publicly available and not protected, we can use composition to instantiate it Observablein classA.
classA
classB
Observable
setChanged()
Interestingly, the defense process was conceived setChanged().
If setChangedsuch were publicly available, then everything could change them. Only the object itself should be able to modify them.
setChanged
ClassA, ClassB, , , ClassA, Observable; ClassA, - , Observable ClassA.
ClassA
ClassB
Iterator.
Iterator