posted 22 years ago
R&H book have a following question:
Consider these classes, defined in separate source files:
1. public class Test1 {
2. public float aMethod(float a, float b)
throws IOException {
3. }
4. }
1. public class Test2 extends Test1 {
2.
3. }
Which of the following methods would be legal (individually) at line 2 in class Test2?
A. float aMethod(float a, float b) { }
B. public int aMethod(int a, int b) throws Exception { }
C. public float aMethod(float a, float b) throws Exception { }
D. public float aMethod(float p, float q) { }
The book indicate letter "C" is wrong, but why??? I don't understand the explanation.
Thanx