java.io · java.base · since Java 1.1

BufferedReader

declaration
public class BufferedReader extends Reader

Buffered character reading plus readLine() and the lazy lines() stream — the standard way to consume text line by line.

Key methods

String readLine()Next line without its terminator; null at end.
Stream<String> lines()Lazy line stream — close the reader (try-with-resources).