利用split对一个字符串按逗号“”,“”分割成数组

Stirng attach_id = "a,da,dsa,rew,rew,dsa";

String[] arr=new String(attach_id).split("[\,]"); //用split对一个字符串按逗号分割成数组
String str = Arrays.toString(arr);    //str数组


原文地址:https://www.cnblogs.com/Darkqueen/p/12068115.html