Why BufferedReader
Buffered vs unbuffered reads.
Reading Input in Java
Most real programs need input from the user: a name, a number, a command. Java has several ways to read input, but one of the most common and efficient is BufferedReader.
In this lesson you will learn why BufferedReader exists and when to reach for it.
Where Input Comes From
When you type into a console, your text flows in through System.in. This is a low-level byte stream — it gives you raw bytes, not friendly text.
To turn those bytes into readable characters and whole lines, we wrap System.in in helper classes. BufferedReader is the wrapper that makes this easy.
All lessons in this course
- Why BufferedReader
- Reading Lines
- Parsing Numbers from Input
- Closing Streams Safely