java.io.FileNotFoundException: E:\tmp (拒绝访问。)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.sxit.Object01.main(Object01.java:56)
解决方法:
new File("E:\\tmp\\")
改成
new File("E:\\tmp\\demo.txt")
//要具体到某一个文件,而不是文件夹