Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java read file bufferedreader

try {
	File file = new File("data.txt");
	BufferedReader reader = new BufferedReader(new FileReader(file));
	String line;

	while((line = reader.readLine()) != null) {
	 	 System.out.println(line);
	}
} catch(IOException e) {
  	e.printStackTrace();
}
 
PREVIOUS NEXT
Tagged: #java #read #file #bufferedreader
ADD COMMENT
Topic
Name
5+4 =