Java Utililty Methods Random Element

List of utility methods to do Random Element

Description

The list of methods to do Random Element are organized into topic(s).

Method

StringrandomElementOf(String[] array)
random Element Of
int size = array.length;
return array[random(size)];
ListrandomEles(List list, int count)
random Eles
final List<T> result = new ArrayList<T>(count);
int limit = list.size();
while (--count > 0) {
    result.add(randomEle(list, limit));
return result;