I need to get code that will allow me to remove duplicates of numbers as I have a random number generator which generates number associated to the counter of an array, the array being a 'pack' of cards, so I can't really afford to change the code but I really need to stop duplicates appearing!
Other questions on here require me to change my whole code, which I can't do as it means I have to start over which I really don't have the time for at the moment as I need to begin testing in a week and I still have more code to implement!
for (int v = 0; v < 30; v++)
{
Random rnd = new Random();
rnd.nextInt(30);
int i = rnd.nextInt(30);
System.out.println(i + " " + aCards[i].getCard());
}
This is what the code above produces, there are clearly duplicates within the list!