package javaapplication1;
import java.io.File;
import java.io.IOException;
public class JavaApplication1 {
public static void main(String[] args) throws IOException {
File file = new File("d://data3.txt");
boolean deleted = file.delete();
if (deleted)
System.out.println("Deleted");
else
System.out.println("Not Deleted");
}
}
/*
run:
Deleted
*/