Skip to content
Sharp

Software Architecture · interview question

Which of the following best describes the Observer Pattern in Java?

Multiple choiceEasychapter-13-curatedpremiumsoftware-architectureobserver-pattern
Choose one answer
Answer and explanation

Correct answer

D. A design pattern where an object, known as the subject, maintains a list of its dependents, called observers, and notifies them of any state changes.

Why

The Observer Pattern involves a subject and its observers. The subject maintains a list of observers and notifies them when a state change occurs, which helps in decoupling the event producer from its consumers.

Test yourself on Software Architecture

A free test with instant, explained results. No account needed.

Start free test
All Software Architecture questions →