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 double method2(int b) {}
Line 6 }
Line 7 public ClassB extends ClassA
Line 8 {
Line 9 public ClassB() {}
Line 10 public int method1(int b, int c) {}
Line 11 public double method2(double c) {}
Line 12 }
A) 10, 4
B) 11, 5
C) Both A and B
D) None of the above
Correct Answer:

Verified
Correct Answer:
Verified
Q12: This annotation tells the Java compiler that
Q13: An abstract class is not instantiated, but
Q14: If a method in a subclass has
Q15: When a subclass overloads a superclass method:<br>A)
Q18: A protected member of a class may
Q19: Look at the following code and determine
Q20: What is wrong with the following code?<br>Public
Q21: If you do not provide an access
Q27: In an inheritance relationship, the subclass constructor
Q54: A compiler error will result if an