Java tutorial
//package com.java2s; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { static public void savelog(String processedStr) { String fullFilename = "D:/test.txt"; try { File newTextFile = new File(fullFilename); FileWriter fw; fw = new FileWriter(newTextFile); fw.write(processedStr); fw.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }