jeudi 3 septembre 2015

Java random without repetition

How can I implement an integer random, that can generate each number just one time but without repetition. I use this code in Android.

int random = Random.nextInt((max+1 - min) + min;

Problem: between max and min there is repeated numbers and also some numbers, they don't exist.




Aucun commentaire:

Enregistrer un commentaire