Why are observers no longer used in Java?

Ans: The Observable class and the Observer interface have been deprecated in Java 9 because the event model supported by Observer and Observable is quite limited, the order of notifications delivered by Observable is unspecified, and state changes are not in one-for-one correspondence with notifications.

Sizin İçin Seçtik  What is the difference between Observer and Decorator design pattern?

Leave a Reply

Your email address will not be published. Required fields are marked *