I have this following code:
public class MyObservable extends Observable {
// ...
public void doSomething() {
// do stuff
setChanged();
notifyObservers();
}
}
public class A implements Observer {
public void update(Observable o, Object arg) {
// do something
}
}
public class B implements Observer {
public void update(Observable o, Object arg) {
// do something
}
}
And the main function:
public static void main(String[] args) {
MyOvervable a = new MyObservable();
a.addObserver(new A());
a.addOberser(new B());
a.doSomething();
}
Is the order the update functions are called by notifyObservers() the same order as I added the observers with addObserver()?