Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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:	esting.txt
br = new BufferedReader(new FileReader(s)); // And to use that file path in the FIleReader use like this;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #file #console #java
ADD COMMENT
Topic
Name
3+8 =