StringJoiner是java 1.8後util包新增的格式化字符串的工具類java
StringJoiner joiner = new StringJoiner(",", "gg-", "-gg"); System.out.println(joiner.add("11").add("22").add("33"));
打印結果工具