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();