For question 1, its (d), because if you use
RandomAccessFile with mode "rw" and the file does not exist, a new empty file is created. Similarly for FileOutputStream, if the file does not exist, it is created. So the answer is (d) any of these.
For question 2, The answer is yes, as containers can contain containers.
thanks,
Zulfiqar Raza.
Originally posted by Mamta Jha:
hi everyone,
1> In the foll. ques
To create a file,you can use an instance of class
a>File
b>randomaccessfile
c>FileOutputStream
d>any of these //ans
e>b and c
but acc. to me it should be a>File as we use an instance of File class to create a file like,
File f=new File("file name");
FileOutputStream fos=new FileOutputStream(f);
RandomAccessFile ras=new RandomAccessFile(f);
2> Can an applet be added to a container?
I think it can't be as it itself is a container
pl.anybody clear my doubt
thanks in advance,
Mamta