Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

What Java technique would you use to implement it?

Nice?Vote!
There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?
asked 1 year ago in Java Interview Questions and Answers by anonymous

1 Answer

Nice?Vote!
If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.
answered 1 year ago by anonymous

Related questions