Core Java Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 264 Page Views: 

What is the purpose of Observer and Observable?



Posted By: Avi Date: 4 November 2010 04:15:50 PM
 Answer:

Subclass of Observable class maintain a list of observers. Whenever an Observable object is updated, it invokes the update() method of each of its observers to notify the observers that it has a changed state.


Posted By: avibtech


Date: 4 November 2010 04:15:50 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image 9KtMtY
Related Questions
Core Java : What is the purpose of the finally clause of a try-catch-finally statement?

What is the purpose of the finally clause of a try-catch-finally statement?

It is used to provide the capability to execute code no matter if an exception is thrown or not.
Category: Core Java Date: 11/2/2010 7:01:48 PM
Core Java : What restrictions are placed on method overloading?

What restrictions are placed on method overloading?

Two methods may not have the same name and argument list but different return types.
Category: Core Java Date: 11/2/2010 6:49:54 PM
Core Java : How make a for statement loop indefinitely?

How make a for statement loop indefinitely?

for(;;) ;
Category: Core Java Date: 11/2/2010 6:28:48 PM
Core Java : What event results from the clicking of a button?

What event results from the clicking of a button?

The ActionEvent event is generated as the result of the clicking of a button.
Category: Core Java Date: 11/2/2010 6:16:53 PM
Core Java : When does the compiler supply a default constructor for a class?

When does the compiler supply a default constructor for a class?

The compiler supplies a default constructor for a class if no other constructors are provided.
Category: Core Java Date: 11/2/2010 5:55:46 PM