vendredi 25 novembre 2016

How to Random numbers in java without duplicating its occurance

Got some problem on java where in i need to check if the displaying number is already in a existing array .

int x = 0; x < 10; x++) { int display = Array.getRandom(); array[x] = display; /* The Checker should be placed here * to check the current number to be displayed * whether it is already displayed or not * If Display already then Redraw * else Display */ System.out.println(display); }




Aucun commentaire:

Enregistrer un commentaire