Write into a file in java:-
In this article we will have a brief look on how to write into a file in java using BufferedWriter. BufferedWriter works almost similar to FileWriter but it uses internal buffer to write the text into a file. BufferedWriter is used in java to write to a file when number of write operations is more.
public class Main
public static void main(String args)
BufferedWriter out = new
System.out.println(“File created successfully”);
catch (IOException e)
File created successfully