private static String savefile = "E://test.txt";
private static void saveAsFileWriter(String content) {
FileWriter fwriter = null;
try {
fwriter = new FileWriter(savefile);
fwriter.write(content);
} catch (IOException ex) {
ex.printStackTrace();
} finally {
try {
fwriter.flush();
fwriter.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/16504.html