R

Ram Sharma • 193.86K Points
Coach

Q. Which method is used to add a new line to file in Java?

  • (A) file.addLine()
  • (B) file.nextLine()
  • (C) file.write()
  • (D) file.line()
  • Correct Answer - Option(C)
  • Views: 226
  • Filed under category JAVA

Explanation by: Team MCQ Buddy
The file.write() method is used to add a new line to file in Java.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics