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  阅读(959)  评论(0)    收藏  举报