我有以下代码
List<String> test = new ArrayList<String>();
test.add("one");
test.add("two");
test.add("three");
Run Code Online (Sandbox Code Playgroud)
"one,two,three"使用Array Utils 需要输出为单个字符串.需要单线解决方案.
Vis*_*hnu 11
使用加入
String joined2 = String.join(",", test );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6108 次 |
| 最近记录: |