Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jxam

 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
someplease help me.
vivek
 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would love to hear from u guys.
please come forward to help me.
vivek
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic