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

Method main

streams/RandomGenerators.java:15–32  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

13 System.out.println("++++++++");
14 }
15 public static void main(String[] args) {
16 Random rand = new Random(47);
17 show(rand.ints().boxed());
18 show(rand.longs().boxed());
19 show(rand.doubles().boxed());
20 // Control the lower and upper bounds:
21 show(rand.ints(10, 20).boxed());
22 show(rand.longs(50, 100).boxed());
23 show(rand.doubles(20, 30).boxed());
24 // Control the stream size:
25 show(rand.ints(2).boxed());
26 show(rand.longs(2).boxed());
27 show(rand.doubles(2).boxed());
28 // Control the stream size and bounds:
29 show(rand.ints(3, 3, 9).boxed());
30 show(rand.longs(3, 12, 22).boxed());
31 show(rand.doubles(3, 11.5, 12.3).boxed());
32 }
33}
34/* Output:
35-1172028779

Callers

nothing calls this directly

Calls 2

showMethod · 0.95
boxedMethod · 0.80

Tested by

no test coverage detected