o8if 0902

o8if 0902



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;

>

J L

Translate tbe boolean into 1 for TRUE and O tor FALSE


Wyszukiwarka

Podobne podstrony:
Testy Gimnazjalne2 Transkrtpcia NAGRAŃ o 48    Ants don t need to sleep at all, cows
blocks flipflop - Print out a template for this rocker from the plans. (no need to bother with all t
skanowanie0050 (9) disadvantages, and to work out the most effective way of their use in class, As.
18 p05 #include <stdio.h> #include <conio.c> class HojaKlasa { public: int
18 p06 #include <stdio.h> #include <conio.c> class HojaKlasa { public: int
19 p02 #include <stdio.h> class próba { public: int    aa; int
19 p03 #include <stdio.h> class próba { public: int    aa; int
19 p04 #include <stdio.h> class próba { public: int    aa; int
19 p06 #include <stdio.h> class próba { public: próba(); -próba();>; próba::próba()

więcej podobnych podstron