Difference between buffered reader and file reader and scanner class [duplicate]
问题 This question already has answers here : Scanner vs. BufferedReader (12 answers) Closed 5 years ago . Can anyone explain me the difference between the class BufferedReader , FileReader and Scanner ? and which one to use when I want to read a text file? 回答1: Well: FileReader is just a Reader which reads a file, using the platform-default encoding (urgh) BufferedReader is a wrapper around another Reader , adding buffering and the ability to read a line at a time Scanner reads from a variety of