GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — OnJava8-Examples/patterns/CommandPattern.java at master · Rudy-debug/OnJava8-Examples Expand file tree/ Copy pathCommandPattern.javaMore file actions 19 lines (18 loc) · 567 Bytes / Copy pathCommandPattern.javaFile metadata and controls19 lines (18 loc) · 567 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 // patterns/CommandPattern.java // (c)2017 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. import java.util.*; public class CommandPattern { public static void main(String[] args) { List<Runnable> macro = Arrays.asList( () -> System.out.print("Hello "), () -> System.out.print("World! "), () -> System.out.print("I'm the command pattern!") ); macro.forEach(Runnable::run); } } /* Output: Hello World! I'm the command pattern! */ |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |