Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Bufferedreader' - 2 question(s) found - Order By Newest | ||||
| ||||
Ans. File file = new File("/home/sample.txt"); FileReader fileReader = new FileReader(file); BufferedReader bufferedReader = new BufferedReader(fileReader); while ((line = bufferedReader.readLine()) != null) { System.out.println(line); } | ||||
![]() | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. Scanner is used for parsing tokens from the contents of the stream while BufferedReader just reads the stream. BufferedReader read files efficiently by using a buffer to avoid physical disk operations. Buffer size of Scanner is usually smaller than the Buffered Writer. BufferedReader is faster that Scanner as it just reads the Stream and doesn't Parse the tokens to read the stream into primitive data types. | ||||
![]() ![]() | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() a. application.xml b. project.xml c. web.xml d. build.xml | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||