Interview Questions

Java - Convert String Array to token separated String

Use the following code to convert a String Array to token separated String in Java.

String[] sts = new String[]{"str1","str2","str3"};
System.out.println(org.apache.commons.lang.StringUtils.join(sts,","));

5
Average: 5 (1 vote)
Your rating: None