code: public static <T> T randomFrom(T[] array) {
      checkArgument(isNotEmpty(array), "Array cannot be empty");
      return IterableUtils.randomFrom(Arrays.asList(array));
    }
docs: Returns a random element from the given array.
  
  @param array array to return random element from
  @param <T> the type of elements in the given array
  @return random element from the given array
  @throws IllegalArgumentException if the array is empty