What is the meaning of " br.readline() " | SoloLearn: Learn to code for FREE!


What is the meaning of " br.readline() "

5/20/2019 9:04:23 AM


1 Answer

New Answer


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(); }