Following to some forums answers I\'m using this:
while (fileReader.nextLine() != null) { String line = fileReader.nextLine(); System.out
while(inFile.hasNext())
This is correct in java programming language