I wish to convert a list of Strings to an array of strings.
I do:
// ccEmails is the list of Strings
String [] emailsAsArray = new String [ccEmails.size()];
Integer i = 0;
for (String singleCCEmail: ccEmails) {
emailsAsArray[i++] = singleCCEmail;
}
This seems a horrible cumbersome way. Is there a better way?