/** |
* 实现程序退出删除文件 |
* |
* @throws IOException |
*/ |
private static void method_02() throws IOException { |
File f = new File( "a.txt" ); |
f.deleteOnExit(); // 程序退出删除文件 |
if (f.exists()) // 判断文件是否存在 |
f.delete(); // 删除 |
} |