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

Method main

streams/SelectElement.java:10–17  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8
9public class SelectElement {
10 public static void main(String[] args) {
11 System.out.println(rands().findFirst().getAsInt());
12 System.out.println(
13 rands().parallel().findFirst().getAsInt());
14 System.out.println(rands().findAny().getAsInt());
15 System.out.println(
16 rands().parallel().findAny().getAsInt());
17 }
18}
19/* Output:
20258

Callers

nothing calls this directly

Calls 2

randsMethod · 0.80
getAsIntMethod · 0.45

Tested by

no test coverage detected