资本力时代
package util;
import java.io.BufferedReader;
import java.io.FileReader;
import java.sql.SQLException;
public class TestDB {
public static void main(String[] args) throws SQLException {
try {
String record = null;
int recCount = 0;
FileReader fr = new FileReader("d:\\qc.log");
BufferedReader br = new BufferedReader(fr);
record = new String();
while ((record = br.readLine()) != null) {
recCount++;
System.out.println(recCount + ":" + record);
}
br.close();
fr.close();
} catch (Exception e) {
e.printStackTrace();
} finally {
}
}
}