What is the difference between BufferdReader and Scanner?

Asked 2 years ago, Updated 2 years ago, 97 views

As far as I know, the method of reading data based on characters from a file is the Scanner and Buffered Reader methods. We also know that BufferedReader uses buffers to efficiently read files to avoid physical disk operations.

My question is

file-io java java.util.scanner

2022-09-21 18:26

1 Answers

Scanner uses tokens to parse from the contents of the stream, and BufferedReader uses them to just read the stream without any special parsing. You can pass the Buffered Reader to the Scanner for parsing the Buffered Reader string.


2022-09-21 18:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.