Skip to content

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.ou…

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 FileRea…