import java.io.File;
public class FileDemo {
public static void main(String[] args) {
File file = new File("/home/huanyu/Downloads/123.pdf");
if (file.delete()){
System.out.println(file.getName()+"删除成功!");
}else {
System.out.println("文件删除失败!!!!!");
}
}
}