I am developing a quiz game, where I have to get random activities on answering the questions as to avoid the questions in same order. I have fixed this by using switch
switch
use
ArrayList number = new ArrayList(); for (int i = 1; i <= 10; ++i) number.add(i); Collections.shuffle(number);