Naveen's
SCJP site
http://www.javaprepare.c om/quests/test.html
Question 32 states:
If a base class has a method defined as
void method() { }
Which of the following are legal prototypes in a derived class of this class. Select all correct answers.
a. void method() { }
b. int method() { return 0;}
c. void method(int i) { }
d. private void method() { }
The answer key lists a and c as the correct answers. The question, however, is ambiguous
based on the fact that if the derived class is in a different package than the super class, D is correct also. If the derived class cannot see the method due to access modifiers, it cannot override it (therefore it hides or shadows it). I would re-word the question to state that the two classes are in the same package.