import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class PaperInputFramework { public static void main(String[] args) { try { File inputFile = new File("input.txt"); Scanner scanner = new Scanner(inputFile); while (scanner.hasNextLine()) { String line = scanner.nextLine(); System.out.println(line); } scanner.close(); } catch (FileNotFoundException e) { System.out.println("File not found: " + e.getMessage()); } } }


上一篇:
下一篇:
切换中文