1
2
3
4
5
6
7
String str="112,123,123,123";//根据逗号分隔到List数组中

                String str2=str.replace(" ", "")//去掉所用空格

List<String> list= Arrays.asList(str2.split(","))
//list的结果就是[113,123,123,123]