51,408
社区成员
发帖
与我相关
我的任务
分享
这没标准的文件是咋生成的?

你这个值之间还有空格就比较尴尬了
public static void main(String[] args) {
String testS = "值一 值 二 值五 值六";
String arrayS[] = testS.replace(" ", ",").split(",");
for (int i = 0; i < arrayS.length; i++) {
System.out.println(arrayS[i]);
}
}
这样吧
