Vidyalelo
Java Programming · Q4

Input Output

Programming · Java Programming · question 4

Q4

How can you close a file after reading or writing in Java?

A.
By using the `terminate()` method
B.
By using the `close()` method of the file stream
Answer
C.
By using the `readLine()` method
D.
By using the `exit()` method

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board