-
Junior Member
core java
what are Observer and Obeservable in Java?
-
Junior Member
Re: core java
Objects that subclass the Observable class maintain al ist of observers.
when an observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state.The observer interface is implemented by objects that observe observable objects.
-
Junior Member
-
Junior Member
Re: core java
The observable class is used to create subclasses that other parts of your program can observe.
When an object of such a subclass undergoes a change, observing classes are notified.
obeserving classes must implement the observer interface, which defines update method.
OBSERVER : To observe an observable object you must implement the observer interface. This interface defines only one method called update().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules