how would you do this........write a method that repeatedly selects and removes a random entry from an array until the array holds no more entries
this is what i got
while ( count != array.length){
int random = (int)(Math.random() * array.length ) ;
if (array[random] != 0){
array[random] = 0;
count++;
}
}
i'm assuming the array holds ints and i set the indexes to 0.