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

Method main

reflection/PetCounter3.java:36–44  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

34 }
35 }
36 public static void main(String[] args) {
37 Counter petCount = new Counter();
38 new PetCreator().stream()
39 .limit(20)
40 .peek(petCount::count)
41 .forEach(p -> System.out.print(
42 p.getClass().getSimpleName() + " "));
43 System.out.println("\n" + petCount);
44 }
45}
46/* Output:
47Rat Manx Cymric Mutt Pug Cymric Pug Manx Cymric Rat

Callers

nothing calls this directly

Calls 3

peekMethod · 0.80
printMethod · 0.80
streamMethod · 0.45

Tested by

no test coverage detected