Home »
MCQs »
Java MCQs
Which method in java is used to read lines from file?
42. Which method in java is used to read lines from file?
- file.read()
- file.nextLine()
- file.getLine()
- All of these
Answer: C) file.getLine()
Explanation:
The file.getLine() method is used to read lines from a file.