核实
List<String> arr = Arrays.asList(imageThumbUrlsRandom); Collections.shuffle(arr); arr.toArray(imageThumbUrlsRandom);
如果您有自己的RNG(或者如果您只想为默认的RNG指定种子),您可以传递它:
long seed = 0xDEADBEEFL; Random rng = new Random(seed); List<String> arr = Arrays.asList(imageThumbUrlsRandom); Collections.shuffle(arr, rng); arr.toArray(imageThumbUrlsRandom);