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

Method main

standardio/Echo.java:10–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8
9public class Echo {
10 public static void main(String[] args) {
11 TimedAbort abort = new TimedAbort(2);
12 new BufferedReader(
13 new InputStreamReader(System.in))
14 .lines()
15 .peek(ln -> abort.restart())
16 .forEach(System.out::println);
17 // Ctrl-Z or two seconds inactivity
18 // terminates the program
19 }
20}

Callers

nothing calls this directly

Calls 2

restartMethod · 0.95
peekMethod · 0.80

Tested by

no test coverage detected