Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
Check for class Java.io.BufferedReader. BufferedReader is classified as buffered I/O streams more specifically reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. readline is method to help you read data from a file per line. ============== Example reading a file BufferedReader br = new BufferedReader(new FileReader("test.txt")); try { String line; while ((line = br.readLine()) != null) { // process the line } } finally { br.close(); }
20th May 2019, 10:14 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar