I have an ArrayList that I would like to combine with the separator ',', I read in some answers that StringUtils.join is a good option, but the problem is that when I try to join the ArrayList, I get the following error:
java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.join(Ljava/util/Collection;C)Ljava/lang/String;
the code:
ArrayList<String> friendsList = new ArrayList<String>(); . . . StringUtils.join(friendsList, ',');
What am I missing?
when I encode netbeans, it does not warn me about this error, it only happens when trying to compile.
java arraylist apache-commons
ufk
source share