the answer will be no good to you, you need to know the reasons. Why are you
having a problem with these? what do you think the right answers are? why?
we're not here to do your homework, we are here to make you a better
programmers..
chanoch
-----Original Message-----
From: indranil4@v... [mailto:indranil4@v...]
Sent: 05 March 2002 10:06
To: Professional Java
Subject: [pro_java] Help needed for some objective type questions
Dear All,
Please help me out with these questions and answer as ( eg.1-A, 2-B). The
questions are as follows:-
1. Which of the following statements are true:-
(a)Methods cannot be overridden to be more private.
(b)static methods cannot be overloaded.
(c)Private methods cannot be overloaded.
(d)An overloaded method cannot throw exceptions not checked in the
base class.
2. System.out.println can be used to print the following.
(a) Any object.
(b) Objects of classes who implemented toString().
(c) Primitive datatypes, Strings and String Buffers.
(d) Only Strings
3. Class A extends class B, which extends class C. All the 3 classes
implement the the method test(). How can a method in Class A invoke the
test() method in Class C without creating any instance of Class C.
(a) C.test().
(b) super.test().
(c) super.super.test().
(d) Not possible to invoke test() in C from method in A.
4. What is true of servlets?
(a) its platform independent.
(b) its platform dependent.
(c) its server dependent.
(d) its JVM dependent.
5. public class A
{
/* Modifier */ class inner {}
}
What can be the Modifier?
(a) private & public
(b) private & static
(c) public & static
(d) private, public, static.
Please reply ASAP.
Bye for now,
With warm regards,
Indranil Sen.