Which of these methods calls update() method?

Which of these methods calls update() method?
A. notify()
B. observeObject()
C. updateObserver()
D. notifyObserver()
 
Answer: d
Explanation: notifyObserver() notifies all the observers of the invoking object that it has changed by calling update(). A null is passed as the second argument to update().
 

Tìm kiếm

Back
Top