数组转字符串,加逗号,最后一个不加逗号

list.forEach(i-> {
    
    
                    list1.append(i);
                    if(i!=list.get(list.size()-1)){
    
    
                        list1.append(",");
                    }
                });


String.join(",",xxxxxxxxxxxx)

猜你喜欢

转载自blog.csdn.net/NewBeeMu/article/details/106233993