Multiple Choice
Look at the following code. The method in line ________ will override the method in line ________. Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public int method1(int a) {}
Line 5 public int method2(int b) {}
Line 6 }
Line 7 public ClassB extends ClassA
Line 8 {
Line 9 public ClassB() {}
Line 10 public int method1(int b) {}
Line 11 public int method2(double c) {}
Line 12 }
A) 4, 10
B) 5, 11
C) 10, 4
D) 11, 5
E) Both A and B
Correct Answer:

Verified
Correct Answer:
Verified
Q19: Inheritance involves a subclass, which is the
Q28: In an interface all methods have:<br>A) private
Q29: In a class hierarchy:<br>A) the more general
Q31: Look at the following code: Line 1
Q32: This is a variable whose value is
Q32: A subclass may call an overridden superclass
Q34: Which of the following is TRUE about
Q35: Look at the following code. What is
Q36: What is wrong with the following code?<br>IntCalculator
Q37: In the following statement, which is the