File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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


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.
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 Shrivastava
Ranch Hand

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

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

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:
subject: Jxam
It's not a secret anymore!