太简单了 用一个split()方法
String s = "65,45,5,145,8,5,6";
String[] str = s.split(",");
这样就行了
String[] strArray = "65,45,5,145,8,5,6, ".split(",");
Code:
public static void main(String[] args) {
String[] str = "65,45,5,145,8,5,6, ".split(",");
for (int i=0;i
}
}
Output:
run:
65
45
5
145
8
5
6