import java.io.File; |
import java.io.IOException; |
public class DeleteFile{ |
public static void main(String[] args){ |
// 实例化File类的对象 |
File f = new File( "f:" +File.separator+ "bchxsx.java" ); |
if (f.exists()) //判断文件是否存在 |
f.delete(); //删除文件 |
} |
} |