private static String randomElement(ArrayList<String> list){
  int index=random.nextInt(list.size());
  return list.get(index);
}

private static String randomElement ( ArrayList < String > list ) { int index = random . nextInt ( list . size ( ) ) ; return list . get ( index ) ; }
utility to grab a random element from an array of strings .
