Guest User

Untitled

a guest
Nov 12th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. ArrayList<Integer> array = new ArrayList<>(4);
  2. ArrayList<Integer> input = new ArrayList<>(4);
  3. for(int i=0;i<10;i++){
  4. array.add(i);
  5. }
  6.  
  7. Collections.shuffle(array);
  8.  
  9. for(int j=0;j<4;j++){
  10. input.add(array.get(j));
  11. }
  12. // This generates unique numbers
Add Comment
Please, Sign In to add comment