পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Thursday, January 19, 2017

Java.util.Observable Class

Introduction

The java.util.Observable class represents an observable object, or "data" in the model-view paradigm.Following are the important points about Observable:

  • The class can be subclassed to represent an object that the application wants to have observed.
  • An observable object can have one or more observers.

Class declaration

Following is the declaration for java.util.Observable class:
public class Observable
   extends Object

Class constructors

S.N. Constructor & Description
1 Observable()
This constructs an Observable with zero Observers.

Class methods

S.N. Method & Description
1 void addObserver(Observer o)
This method adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
2 protected void clearChanged()
This method indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
3 int countObservers()
This method returns the number of observers of this Observable object.
4 void deleteObserver(Observer o)
This method deletes an observer from the set of observers of this object.
5 void deleteObservers()
This method clears the observer list so that this object no longer has any observers.
6 boolean hasChanged()
This method tests if this object has changed.
7 void notifyObservers()
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
8 void notifyObservers(Object arg)
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
9 protected void setChanged()
This method returns marks this Observable object as having been changed; the hasChanged method will now return true.

Methods inherited

This class inherits methods from the following classes:
  • java.util.Object

No comments:

Post a Comment