List of utility methods to do Collection to Array
final int length = c.size(); final String[] array = new String[length]; if (length > 0) { int i = 0; for (final String s : c) { array[i++] = s; return array;