分割字符串沒用是怎么回事?
s=rf.readLine();上面這句?意思是讀取一行,當(dāng)然下面用這個split就是一行的內(nèi)容了除非你String result = "";while(null != (s = rf.readLine())) { result += s + "\n";}String[] t = result.split("\n"); for (int i = 0; i < t.length;i++){ a[i]=t[i]; System.out.println(t[i]);} rf.close();