Answers for "how to read file from console in java"

0

how to read file from console in java

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;
Posted by: Guest on June-14-2021

Code answers related to "how to read file from console in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language