Convert String[] to comma separated string in java

Either write a simple method yourself, or use one of the various utilities out there.

Personally I use apache StringUtils (StringUtils.join)

edit: in Java 8, you don’t need this at all anymore:

String joined = String.join(",", name);

Leave a Comment