String (List<String> list) { StringBuilder sb = new StringBuilder(); boolean first = true; for(String s : li<caret>st) { sb.append(", ").append(s.trim()); } return sb.length() == 0 ? null : sb.toString(); }