Scanner vs. BufferedReader

As far I know, the two most common methods of reading character-based data from a file in Java is using Scanner or BufferedReader. I also know that the BufferedReader reads files efficiently by using a buffer to avoid physical disk operations.

My questions are:

  • Does Scanner perform as well as BufferedReader?
  • Why would you choose Scanner over BufferedReader or vice versa?

12 Answers
12

Leave a Comment