hi,
here are some questions from
http://www.certification4career.com/sun/java/programmer/exam1.html but i think the answers of some ques. given on the site are wrong, so i am putting some ques. here. Some questions are also ambigious, e.g. in the first ques.(option:c), it's not clear whether it is a top-level class or an inner class; so what should we answer? In Q29 the option c can't be correct 'coz if the class is defined in a non-static method then the inner class can access any instance variable of the enclosing class but if the class is defined in a static method then the inner class can only access the static class variables of the enclosing class.
thanx.
ashok.
_______
Q17.The private modifier can be applied to ...
a)A variable
b)A method
c)A class
d)All of the above
_______
Q20.An unary operators operate on a single value
a)True
b)False
_______
Q22.The switch() construct is used to make a choice based upon ...
a)A char value
b)An int value
c)A
String value
d)None of the above
_______
Q23.The circumstances that can prevent execution of the code in a finally block are
a)the death of the
thread b)The use of System.exit()
c)It is always guaranteed to be executed.
_______
Q32.Please select invalid statement(s) for a thread
a)You can restart a dead thread
b)You can't call the methods of a dead thread
c)Both of the above
d)None of the above
_______
Q29.An inner class created inside a method can access
a)Any local variables of a method that contain an inner class.
b)Any instance variables of the enclosing class
c)Any final variables of the enclosing class or a method that contain an inner class.
d)None of the above
_______
(fixed link)
[This message has been edited by Marilyn deQueiroz (edited September 06, 2001).]