Skip to content
Sharp

Software Architecture · interview question

How can you prevent an observer from receiving notifications in Java's Observer Pattern?

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

Correct answer

C. Remove it from the subject's observer list.

Why

Removing an observer from the subject's observer list stops notifications for that observer. This approach is efficient and directly modifies the subject's state to reflect the change in observer status.

Test yourself on Software Architecture

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

Start free test
All Software Architecture questions →