I'm trying to convert my set of Strings to an array of Strings so I can operate on them one by one. Is there a better way of doing this or is converting to arrays a good way? However, when I try converting to an array like below then I get errors as it doesn't think that it will always be strings passed in. Would appreciate some pointers.
Set<String> s;
s.add("a");
s.add("b");
String[] item = s.toArray();