When I try
StringUtils.join(myList,',');
I get a compilation failure:
cannot find symbol
symbol : method join(java.util.List,char)
But the following works:
StringUtils.join(myList.toArray(),',');
The docs (Apache Commons Lang 2.5) seem to indicate that both should work, as they record both:
public static String join(Collection collection,
char separator)
and
public static String join(Object[] array,
char separator)
Any ideas? For the record, I'm importing import org.apache.commons.lang.StringUtils;