VOOZH about

URL: https://www.geeksforgeeks.org/java/bufferedwriter-newline-method-in-java-with-examples/

⇱ BufferedWriter newLine() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

BufferedWriter newLine() method in Java with Examples

Last Updated : 28 May, 2020
The newLine() method of BufferedWriter class in Java is used to separate the next line as a new line. It is used as a write separator in buffered writer stream. Syntax:
public void newLine()
 throws IOException
Parameters: This method does not accept any parameter. Return value: This method does not return any value. Exceptions: This method throws IOException if an I/O error occurs. Below programs illustrate newLine() method in BufferedWriter class in IO package: Program 1:
Output:
A
B
Program 2:
Comment
Article Tags: