第一次提问,不知道问题能不能说明白
我的代码如下 能运行 也未抛异常 就是没写到文件里
package hhh;
import java.io.FileWriter;
import java.io.IOException;
public class write {
public static void main(String[] a) {
FileWriter out = null;
try {
out = new FileWriter("F:/sh.txt");
out.write("孙洪超1987");
} catch (IOException e) {
e.printStackTrace();
System.exit(-1);
}
}
}