Skip to content
Advertisement

Tag: bufferedreader

BufferedReader unexpected behavior

I have an unusual problem with BufferedReader in Java 11. I have a simple command-line student tracker application, that reads input from System.in, transforms it into the appropriate implementation of Command interface, and executes it. Some commands simply process the input and print the output to System.out, some keep using reader to receive additional input. For example, AddStudentsCommand implements execution

Read files from directory using BufferedReader

I wrote a code to read a files from a directory. The directory contain many files. Firstly, I count the number of the files in the directory, then I would like to count number of lines in the files that have as extension: .info and .data My code is the following: I got as error: The error concerns the FileReader,

Why bufferedReader is much efficient than Scanner class in java? [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question Have a look in the following question , no matter how much efficiently

Advertisement