JavaRush/Java Blog/Random EN/BufferedReader vs Scanner
KarmaHacker
Level 30

BufferedReader vs Scanner

Published in the Random EN group
members
I solved the problem level22.lesson09.task01 today. In the condition, you need to count words separated by a space, consisting of several lines. Looking at the comments on this task, I was surprised that people read lines mainly through BufferedReader. At the same time, they have a lot of problems, the line needs to be divided into words using split() and line breaks also have difficulties. Similar questions arose in my earlier tasks. In this regard, the question is: why do the JavaRashevites have such a dislike for Scanner? Is this a general misconception or am I missing something? After all , Scanner does an excellent job if we need to count not the entire line, but words separated by spaces and on different lines. There is no need to insert any crutches in the form of splits and think about breaking lines.
Comments
  • Popular
  • New
  • Old
You must be signed in to leave a comment
This page doesn't have any comments yet