aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Jxam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Jxam" Watch "Jxam" New topic
Author

Jxam

Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
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
Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
Hi,
someplease help me.
vivek
Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
Hi,
I would love to hear from u guys.
please come forward to help me.
vivek
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Q1: You are correct. A checkbox may look like it's retaining its size, because it doesn't have a visible border - but if you change the background color, you can see that its size changes the same way other components do.
Q2: The JDK 1.1 API only mentioned IOException, but the docs for JDK 1.2 and 1.3 mention FileNotFoundException - so the exam answer is correct.

"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jxam