+ 2
What is the difference between BufferedReader and Scanner in java?
I know both are used for input and they have different methods, but what exactly are their pros and cons and how to choose between them? Update: Thanks for answering but as far as I know Scanner can also read files and I'm asking why would I choose BufferedReader over Scanner? I was asking If BufferedReader has any feature which Scanner doesn't have?
2 Answers
+ 1
I don't know if it's correct, but I use Scanner to read Standard Input, and BufferedReader to read files.
0
scanner for reading the comments in the form of words or in a line sentence and bufferedreader for reading the files