0
how to use shuffle and reverse function for arrays
please provide some implementation
1 Answer
0
String[] words = {"word1", "word2", "word3"};
ArrayList<String> wordList = new ArrayList<String>(Arrays.asList(words));
Collections.reverse(wordList);
Collections.shuffle(wordList);