Multiple choice technology architecture

The Java API uses this pattern in the event model of its AWT/Swing Classes

  1. Strategy Pattern.

  2. Template Pattern.

  3. Observer pattern.

  4. None of the above.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Java's AWT/Swing event model uses the Observer pattern (also called Listener pattern in this context). Components (subjects) maintain lists of listeners (observers) and notify them when events occur (like button clicks). Listeners implement event listener interfaces and register with components to receive notifications. Strategy and Template patterns don't describe this publish-subscribe relationship.