Shuffle Array of String Java Example

       String[] sAr = new String[] {"one","two","three"};
       List<String> wordList = Arrays.asList(sAr);
       Collections.shuffle( wordList);
       String[]myShuffledArray = wordList.toArray(new String[wordList.size()]);
This entry was posted in Android Examples Code, Array,List,Collections and tagged . Bookmark the permalink.


Comments are closed.



7,222 views