Why BufferedReader and PrintWriter Actually Changed How I Think About Java
By: Namish Joshi
Search for a command to run...
By: Namish Joshi
No comments yet. Be the first to comment.
By: Namish
By: Katrine
By: Aarjit
by: Farah Belhamiti.
By: Namish
I remember feeling annoyed at how much setup it required. Why should reading input take multiple lines of code? Why should I have to deal with exceptions just to read a line of text? Why do I have to import something other than Scanner? Once I understood what BufferedReader was actually doing, my questions and perspective on the new methods changed. It was not just reading input. It was being careful with it. Instead of constantly pulling small pieces of data, it reads larger chunks and works through them. That small design choice made me realize something important. Java was not trying to make things harder. It was trying to make things more efficient and more intentional. Using readLine() also felt different. I knew exactly when input started and ended, and that predictability mattered more than I expected. I also learned how to use StringTokenizer with BufferedReader, making input analysis easier as well, which was very helpful.
These classes are not always necessary. For small programs, Scanner still works fine. But BufferedReader and PrintWriter taught me that good code is not just about working code. It is about understanding why something works and choosing tools with purpose. That shift in thinking is what made Java feel less like a class I was taking and more like a skill I was developing.