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

Method main

collections/SetOfInteger.java:8–14  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

6
7public class SetOfInteger {
8 public static void main(String[] args) {
9 Random rand = new Random(47);
10 Set<Integer> intset = new HashSet<>();
11 for(int i = 0; i < 10000; i++)
12 intset.add(rand.nextInt(30));
13 System.out.println(intset);
14 }
15}
16/* Output:
17[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected