This question has already been answered:

If you explain for a long time - I'll manage with links to explanations)

Reported as a duplicate by participants aleksandr barakin , Denis , Ksenia , pavel , αλεχολυτ Nov 14 Nov '16 at 14:10 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • one
    The scanner will come down for school / university laboratories. For everything else, there is a master card ........ BufferedReader (and not only) - Alexey Shimansky
  • 6

1 answer 1

Similarities:

can receive data from a text file.

Differences:

  • Instances of the java.io class .BufferedReader are designed to read a stream of characters with buffering (characters, arrays, and strings).
  • Instances of the java.util .Scanner class are intended for parsing data into its components, taking into account formats, templates, and various separators. Scanner input can be files, byte streams, character streams, strings.