Skip to content
Sharp

Software Architecture · interview question

Which method must be implemented by a class acting as an observer in Java's Observer Pattern?

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

Correct answer

B. Update()

Why

The update() method is required to be implemented in classes acting as observers, as it is called by the subject to notify the observer of changes or events.

Test yourself on Software Architecture

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

Start free test
All Software Architecture questions →