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"
时间:2024-10-13 01:22:14
List<String> paramList= Stream.of("1", "2","3").collect(Collectors.toList());
String Str= paramList.stream().collect(Collectors.joining(","));
return Str;
//转换后"1,2,3"