Hi ,
I have a situation and have to use Observer
pattern, In my case the Observable (subject) is a singleton, Now I have problem to addObserver(s) in constructor, since the constructor is static and addObserver method (I am reffering to method of java.util.Observable) is non static.
I actually want to add the observer when the instance is created. Is there any other way to do this.
Any suggestion will be greatly appreciated.
Thanks
Venkatesh