public static List get1000Star() { List stars = new ArrayList(); List returnLs = new ArrayList(); for(int i=1;i<=10000;i++) { stars.add(i); } int z = 10000; for(int j=0;j<1000;j++) { double sss = Math.floor(Math.random()*(z-1)+1); int it = (int) sss; returnLs.add(stars.get(it)); stars.remove(it); z--; } return returnLs; }