• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jxam

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
someplease help me.
vivek
 
Vivek Shrivastava
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I would love to hear from u guys.
please come forward to help me.
vivek
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic