java中List转String逗号分隔

2026-02-13 04:55:13

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"

猜你喜欢