📅  最后修改于: 2022-03-11 14:52:24.260000             🧑  作者: Mango
Scanner scanner = new Scanner(new File("filename"));
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
// process the line
}