public static void writeToFile(String key,String value,String filepath){
try {
FileWriter fw = new FileWriter("filepath");
BufferedWriter bw = new BufferedWriter(fw);
bw.write("caonimashabi");
bw.write(key+1);
bw.write(value+"2\r\n");
bw.flush();
bw.close(); fw.close();
System.out.print("好了");
} catch (IOException e) {
// TODO: handle exception
}
}
读取这个文档里面的内容是没问题的,但是写入就是写不进去,求dalao帮忙看一下怎么回事