JAVA将List转化为逗号分隔的字符串

list为integer类型时  

StringUtils.join(list.toArray(),",");       //org.apache.commons.lang.StringUtils

list为String类型时

String.join(",",list);

posted @ 2023-06-26 14:45  Sam_Fisher  Views(555)  Comments(0Edit  收藏  举报