MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / CommandPattern

Class CommandPattern

patterns/CommandPattern.java:14–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14public class CommandPattern {
15 public static void show(Command cmd) {
16 System.out.println(cmd.msg);
17 }
18 public static void main(String[] args) {
19 show(new Command("First Command"));
20 show(new Command("Second Command"));
21 }
22}
23/* Output:
24First Command
25Second Command

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected