📅  最后修改于: 2022-03-11 14:48:20.446000             🧑  作者: Mango
try {
BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
while ((line = bufferedReader.readLine()) != null) {
System.out.println(line);
}
} catch(FileNotFoundException e ) {
System.err.println("File not found");
} catch (IOException e) {
e.printStackTrace();
}