Skip to content

Instantly share code, notes, and snippets.

@seyedsahil
Created March 8, 2020 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seyedsahil/6c9ecc7d202bf50db648e242b19d7ca4 to your computer and use it in GitHub Desktop.
Save seyedsahil/6c9ecc7d202bf50db648e242b19d7ca4 to your computer and use it in GitHub Desktop.
Registering with an Observer instance
package org.sydlabz.mvc;
public class MVC {
public static void main(String[] args) {
MessageQueue messageQueue = new MessageQueue();
MessageListener messageListener = new MessageListener();
messageQueue.addObserver(messageListener);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment