public static < T > T randomFrom ( T [ ] array ) { checkArgument ( isNotEmpty ( array ) , "Array cannot be empty" ) ; return IterableUtils . randomFrom ( Arrays . asList ( array ) ) ; }
Returns a random element from the given array .