Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class MyClass {
- public static void main(String args[]) {
- Set<Integer> s = new TreeSet<Integer>();
- while(s.size() != 30) {
- s.add(new Random().nextInt(100));
- }
- System.out.println(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement