You are on page 1of 1

public static void createFileFromString(String string, File file) { try { PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, false)));

out.println(string); out.close(); } catch (IOException e) { e.printStackTrace(); } }

You might also like