Skip to main content
Copy edited.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // afterAfter '.' write 
// your file extention (".txt" in this case)
fr.write("things"Things you want to write into the file"); // warningWarning: this will REPLACE your old file content!
fr.close();

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // after '.' write 
//your file extention (".txt" in this case)
fr.write("things you want to write into the file"); // warning: this will REPLACE your old file content!
fr.close();

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // After '.' write
// your file extention (".txt" in this case)
fr.write("Things you want to write into the file"); // Warning: this will REPLACE your old file content!
fr.close();

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // after '.' write 
//your file foramtextention (".txt" in this case)
fr.write("things you want to write into the file"); // warning: this will REPLACE your old file content!
fr.close();

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // after '.' write 
//your file foramt (".txt" in this case)
fr.write("things you want to write into the file"); // warning: this will REPLACE your old file content!
fr.close();

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // after '.' write 
//your file extention (".txt" in this case)
fr.write("things you want to write into the file"); // warning: this will REPLACE your old file content!
fr.close();
Source Link
ben
  • 1.1k
  • 3
  • 16
  • 29

I think this is the shortest way:

FileWriter fr = new FileWriter("your_file_name.txt"); // after '.' write 
//your file foramt (".txt" in this case)
fr.write("things you want to write into the file"); // warning: this will REPLACE your old file content!
fr.close();