public static String[] makeStrings(Collection<InetAddress> addrs){
  String[] result=new String[addrs.size()];
  int i=0;
  for (  InetAddress addr : addrs) {
    result[i++]=addr.getHostAddress();
  }
  return result;
}

public static String [ ] makeStrings ( Collection < InetAddress > addrs ) { String [ ] result = new String [ addrs . size ( ) ] ; int i = 0 ; for ( InetAddress addr : addrs ) { result [ i ++ ] = addr . getHostAddress ( ) ; } return result ; }
create a string array of host addresses from a collection of inetaddresses
