// ‘, ‘ 分隔, ‘ 开始 ‘ 结束
String ids = ""; List<String> list = new ArrayList(); list.add("12345"); list.add("12345"); list.add("12345"); ids = list.stream().map(n -> String.valueOf(n)).collect(Collectors.joining("‘, ‘", "‘", "‘")); System.out.println(ids);
原文:https://www.cnblogs.com/LittleMaster/p/14130319.html