List转化为String

List<String> strs = Arrays.asList("aaa", "bbb", "ccc", "ddd");

String listToStr= strs.stream().collect(Collectors.joining(","));

 

参考:

https://blog.csdn.net/weixin_46082526/article/details/108768463

posted @ 2021-11-23 17:32  northli  阅读(944)  评论(0编辑  收藏  举报