【发布时间】:2015-11-06 17:52:25
【问题描述】:
我正在尝试将文件逐行保存为字符串数组,但我是初学者并且很困惑。
package com.java24hours;
import java.io.*;
public class ShorteningVelocity {
public static void main(String[] arguments) throws IOException {
FileReader SVfile = new FileReader(new File("C:\\Documents\\10-27-15110mMKPSS3.dat"));
BufferedReader br = new BufferedReader(SVfile);
String temp = br.readLine();
while (temp != null) {
temp = br.readLine(); //reads file line by line
System.out.println();
}
}
}
【问题讨论】:
-
作为一个有你问题的初学者,我也很困惑......你的问题是什么?你哪里有问题?