Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hackjutsu
Created May 23, 2019 04:40
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 hackjutsu/a8a68e7821f59b0cdd2d1314b4c19361 to your computer and use it in GitHub Desktop.
Save hackjutsu/a8a68e7821f59b0cdd2d1314b4c19361 to your computer and use it in GitHub Desktop.
[medium snippets] #medium #designPattern #StatePattern
public class ClientDemo {
public static void main(String[] args) {
MP3PlayerContext mp3Player = new MP3PlayerContext();
mp3Player.press();
mp3Player.getState();
mp3Player.press();
mp3Player.getState();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment