Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: James Rivera   on Sep 02 In Java Category.

  
Question Answered By: Alfonsine Miller   on Sep 02

Yes, the BufferedWriter would write  in the same line  unless and until you insert
a separate line by the newLine() method

Example:
tempWriter.write("This is a sample line");
tempWriter.newLine();
tempWriter.flush();

Notes:
- use flush() method  if you want to force the writer to insert line immediately.
- You can also use "\n" in the write method to insert line, but DON'T do this.
This is not platform independent.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Write a line in a new line Or get search suggestion and latest updates.


Tagged: