Which method in java is used to read lines from file?

42. Which method in java is used to read lines from file?

  1. file.read()
  2. file.nextLine()
  3. file.getLine()
  4. All of these

Answer: C) file.getLine()

Explanation:

The file.getLine() method is used to read lines from a file.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.