How can I randomly select an item from a list in Java? e.g. I have
List<String> list = new ArrayList<String>();
list.add("One");
list.add("Two");
etc.... How can I randomly select from this list using the
Random myRandomizer = new Random();
How can I randomly select an item from a list in Java? e.g. I have
List<String> list = new ArrayList<String>();
list.add("One");
list.add("Two");
etc.... How can I randomly select from this list using the
Random myRandomizer = new Random();
Something like this?
Clean Code: