All About Interface Observer in Java

A class can implement the observer interface when it wants to be informed of the observable objects changes.

public interface java.util.observer{
//methods
public abstruct void update(Observable obj,Object arg);
this method is called whenever the observed object is changed.An application calls an observable object's notifyObservers() method to have all object's observers notified of the changes.
}
 
All About Interface Observer in Java All About Interface Observer in Java Reviewed by Animesh Chatterjee on September 14, 2018 Rating: 5

No comments:

Powered by Blogger.