fork(3) download
  1. import java.util.ArrayList;
  2. import java.util.Collections;
  3. import java.util.List;
  4.  
  5. public class Main {
  6. public static void main(String[] args) {
  7. List<Integer> lista = new ArrayList<>(60);
  8. for (int i = 1; i <= 60; i++) {
  9. lista.add(i);
  10. }
  11. Collections.shuffle(lista);
  12. lista = lista.subList(0, 6);
  13. System.out.println(lista);
  14. }
  15. }
Success #stdin #stdout 0.09s 320512KB
stdin
Standard input is empty
stdout
[53, 24, 60, 56, 11, 51]