Which method is used to check if there are more lines of text to read from a BufferedReader object?

  • canReadMore()
  • hasMoreLines()
  • hasNext()
  • hasNextLine()
The BufferedReader class has a method called hasNextLine() that is used to check if there are more lines of text to read from the BufferedReader object. It returns true if there are more lines and false if the end of the file has been reached. The other options do not represent the correct method for this purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *