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

Method main

files/ListOfLines.java:9–18  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

7
8public class ListOfLines {
9 public static void
10 main(String[] args) throws Exception {
11 Files.readAllLines(
12 Paths.get("../streams/Cheese.dat"))
13 .stream()
14 .filter(line -> !line.startsWith("//"))
15 .map(line ->
16 line.substring(0, line.length()/2))
17 .forEach(System.out::println);
18 }
19}
20/* Output:
21Not much of a cheese

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
streamMethod · 0.45

Tested by

no test coverage detected