collection of files
Hi guys
i have 10 files like
File f1=new File("path of file 1");
File f2=new File("path of file 2");
.
.
.
.
File f10=new File("path of file 10");
can i add all these files into an array?
thanks®ards
srihari
Hi guys
i have 10 files like
File f1=new File("path of file 1");
File f2=new File("path of file 2");
.
.
.
.
File f10=new File("path of file 10");
can i add all these files into an array?
thanks®ards
srihari
> i think the question is what CAN'T you put into an
> array :-)
yah, you could even make recursive arrays if you really wanted to :)
..
File[] junkFiles = new File[10];
for( int i = 0; i < junkFiles.length; i++ )
junkFiles[i] = new File("StupidFileName" + i + ".txt");
...tada!
> ..
> [code]
> File[] junkFiles = new File[10];
>
> for( int i = 0; i < junkFiles.length; i++ )
> junkFiles = new File("StupidFileName" + i +
> ".txt");
> /code]
> ...tada!
The OP has just been "number 2s". He requests that you attend to his wiping needs