Array Examples Collection c = new HashSet(); // put things in c String[] s = (String[]) c.toArray(new String[0]); returns all the String elements of c in an array of Strings.