All About Class Observable in Java

Class Observable represents an Observable object or data in the model view framework .This class can be sub classed to represent an object that the application wants to have observed.An Observable object can have one or more observers.After an Observable instance changes,an application calling the observable's notify observer's method causing all of its observers to be notified of the changes by a call to their update method.

The class Observable is defined as below:

public class java.util.Observable extends java.lang.Object{
public Observable();
public void addObserver();
public void deleteObserver(Observer obj);
public void deleteObservers();
public void notifyObservers();
public void notifyObserver(Observer obj);
public boolean hasChanged();
public int countObservers();
protected void clearChanged();
protected void setChanged();

All About Class Observable in Java All About Class Observable in Java Reviewed by Animesh Chatterjee on October 01, 2018 Rating: 5

No comments:

Powered by Blogger.