就是我没什么没有refresh
谢谢各位大佬了!!!
package xuexi;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
public class Testhuida {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Writer fw = new FileWriter ("e:"+ File.separator + "test.txt") ;
BufferedWriter bw = new BufferedWriter (fw);
bw.write("1999");
bw.close();
fw.close;
}
}
这样就可以正常创建了,我觉得你的路径名称可能有问题,还有bw,fw要关闭