Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<Integer> array = new ArrayList<>(4);
- ArrayList<Integer> input = new ArrayList<>(4);
- for(int i=0;i<10;i++){
- array.add(i);
- }
- Collections.shuffle(array);
- for(int j=0;j<4;j++){
- input.add(array.get(j));
- }
- // This generates unique numbers
Add Comment
Please, Sign In to add comment