首页 > 其他分享 >list 转 string 以逗号隔开

list 转 string 以逗号隔开

时间:2022-09-20 14:12:47浏览次数:59  
标签:deptNameList ArrayUtil join string list System 逗号 println out

System.out.println(String.join(",",deptNameList));
System.out.println(CollectionUtil.join(deptNameList, ","));
//ArrayUtil 得要这种格式String[]
System.out.println(ArrayUtil.join(deptNameList, ","));
System.out.println(CollUtil.join(deptNameList, ","));


str 转 list
//ArrayUtil 得要这种格式String[]
Arrays.asList()
List<String> split = StrUtil.split(entity.getOrderListStr(), ",");


标签:deptNameList,ArrayUtil,join,string,list,System,逗号,println,out
From: https://www.cnblogs.com/wjsqqj/p/16710822.html

相关文章