📜  如何在 Java 代码示例中从控制台读取文件

📅  最后修改于: 2022-03-11 14:52:34.705000             🧑  作者: Mango

代码示例1
Scanner in = new Scanner(System.in); 
System.out.println("Enter file path");
String s = in.nextLine(); //C:\\testing.txt
br = new BufferedReader(new FileReader(s)); // And to use that file path in the FIleReader use like this;