posted 23 years ago
Hi ,
following questions are from jxam mock exam.
Which of the following retain their preferred size (width and height) when added (individually) to the North section of a container with a BorderLayout (assume that no other components or containers are present in the North section).
1. Button
2. TextArea
3. TextField
4. Checkbox
5. None
given answer is '4'. i think it should be '5'.
please expalint it to me.
Q#2
Which of the following statements are correct regarding the RandomAccessFile class?
1. An IOException is thrown if the specified file doesn't exist when created using the "r" mode.
2. This class has a method which allows a file to be deleted from the harddisk.
3. It is possible to use this class in conjunction with the DataInputStream class.
4. When used with the "rw" mode, the specified file is created on a diskdrive, if it doesn't already exist.
5. There are methods to read and write primatives (eg, readInt(), writeInt(), etc).
given answer is 1,4,5.
i have some confusion about 1. it says about IOException but throws FileNotFoundException. i know IOException is super class
of FileNOTFoundException.
what is going on here ? is it valid answer?
vivek