//: holding/SetOfInteger.java import java.util.*; public class SetOfInteger { public static void main(String[] args) { Random rand = new Random(47); Set intset = new HashSet<>(); for(int i = 0; i < 10000; i++) intset.add(rand.nextInt(30)); System.out.println(intset); } } /* Output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 29, 28] *///:~