import java.io.*;
public class Del
{
public static void main(String[] args)
{
File f = new File("c:/a.txt");
f.delete();
}
}
public class Del
{
public static void main(String[] args)
{
File f = new File("c:/a.txt");
f.delete();
}
}
解决方案 »
- Java界面开发中问题
- javax.naming.NoInitialContextException: Need to specify class name in environmen
- 用whilehe 和 switch来实现一个菜单的程序请各位 帮忙看看 !
- 【竞赛奖励】john_sheep 获得300专家分,请进来收取
- 外国一家公司的一道超难推理面试题,如果你做对了,直接录取拿5K以上的工资不成问题!!!!!!
- 下载实现办法.(只30分了,都给您)
- 问各位高手门一个初级问题,怎么把数组的序列赋给arraylist呢???
- Java继承时构造函数的调用
- JAVA的最好的编辑工具是什么?
- 一个java初学者的菜鸟问题
- 自己写的类编译成.jar文件后怎么在其他类中不能用,高手请指点
- 帮忙提供一加密算法
public boolean delete()
Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted. Returns:
true if and only if the file or directory is successfully deleted; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the file