[求助]怎样取出字符串12,45,5,4,65中的那些数字,结果要为(12 45 5 4 65)
怎样取出字符串12,45,5,4,65中的那些数字,结果要为(12 45 5 4 65)
public class Strnum {
String s="12,45,5,4,65";
public Strnum() {
String s1[]=s.split(",");
for(int j=0;j<s1.length;j++){
System.out.print(" "+s1[j]);
}
}
public static void main(String[] args) {
new Strnum();
}
}