Here you can find the source of writeFile(String fileName, String content)
public static void writeFile(String fileName, String content)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void writeFile(String fileName, String content) { try {/*from w ww . j a v a 2 s . c o m*/ FileWriter fw = new FileWriter(fileName, true); fw.write(content + "\n"); fw.close(); } catch (IOException e) { e.printStackTrace(); } } }