Hi there,
last night i took a mock
test from IBM site.... for the following questions, my answers went wrong because
1) Which of the following declarations of a top-level class Frog are legal, assuming Animal is an existing class?
a) protected class Frog extends Animal {
b) private class Frog extends Animal {
c) transient class Frog extends Animal {
d) native class Frog extends Animal
// here none of the option will fit in for top-level classes.... then what s the use of asking me to select the correct option. Please explain?
2) The following are true of
Java character-oriented streams:
a) They provide support for character conversion between Unicode and ASCII
b) They all implement the CharacterStream Interface
c) They inherit from either the Reader or Writer abstract classes
d) They are restricted to 2^16 (2 raised to power of 16) in length
//Please explain Java character-oriented streams... will there be a question on this in
SCJP exam?
3) With respect to User and Daemon threads:
a) Daemon threads can not be destroyed
b) Running User threads prevent a JVM from terminating program
c) Running Daemon threads prevent a Java VM from terminating program
d) Daemon threads can not be grouped together
e) The JVM can terminate program when only daemon threads are running
// What are the correct options here? can deamon threads be grouped together?
4) An object should be thought of as:
a) A template for creating similarly behaving things
b) A data holder only
c) A mold that can be reused to mold additional things
d) An entity which combines data and functions on that data to create behavior
e) A place, like a file, to store related methods and no data
// This one is little confusing .... kly explain....
5) Given that a java.io.IOException might occur when calling the read() method of the BufferedInputStream, you can handle the exception by:
a) Catch a java.io.EOFException using a try/catch clause.
b) Catch a java.lang.Exception using a try/catch clause.
c) Listing a java.io.EOFException in a throws list.
d) Catch the java.lang.Exception using the throw statement.
// Can i catch a java.io.EOFException using a try/catch clause when java.io.IOException might occur. what is the correct answer?
6) Given an object design where the Person class is the superclass of the Employee class, which of the following statements best describes this relationship?
a) aggregation
b) "is a"
c) "has a"
d)
polymorphism e) independence
// What is this "is a" "has a" here???
Sorry for troubling friends!!!
Venky