java中List转String逗号分隔
java8List转String逗号分隔
List<String> paramList= Stream.of("1", "2","3").collect(Collectors.toList());
String Str= paramList.stream().collect(Collectors.joining(","));
return Str;
//转换后"1,2,3"
阅读量:23
阅读量:133
阅读量:78
阅读量:74
阅读量:171
List<String> paramList= Stream.of("1", "2","3").collect(Collectors.toList());
String Str= paramList.stream().collect(Collectors.joining(","));
return Str;
//转换后"1,2,3"