Dedare class as publicfy avaiiabie
I need to list ("import”) all nondetault classes explicitly
import java.io.File;
Static (no object needed ?o|_|
cali it) delete tunction returns an integer \\
instantiate a file objęci and1 cali tbe delete method. r-retuming a boolean I
“public class JDelete (
• public static int delete (String fileName) {
Filc myFilc = ncw Filc (filcnamc);
-boolean retval = myfile.delete{);
if {retval) return 1; else return 0;
>
Translate tbe boolean into 1 for TRUE and O tor FALSE