百度好久,找到的这个我感觉是挺好使的一种方法 原文地址:https://zhidao.baidu.com/question/136765761398462045.html
String[] ary = {"abc", "123", "45"}; 想要得到 String str="abc,123,45";
需要引入Apache Commons组件中的个commons-lang.jar包:
String str1=StringUtils.join(ary, ",");
转载于:https://blog.51cto.com/82711020/2147821