Skip to content
Sharp

Software Architecture · interview question

You notice that your Observer Pattern implementation in a Java application results in redundant notifications. How can you optimize this?

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

Correct answer

C. Use a filtering mechanism to check observer interest before notifying.

Why

By implementing a filtering mechanism, the system checks if an observer is interested in the specific event before sending a notification. This reduces redundant notifications and improves efficiency.

Test yourself on Software Architecture

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

Start free test
All Software Architecture questions →