Multiple Choice
In the following code, which line will cause a compiler error? Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public int method1(int a) {}
Line 5 public final int method2(double 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) Line 4
B) Line 5
C) Line 10
D) Line 11
Correct Answer:

Verified
Correct Answer:
Verified
Q16: In the following statement, which is the
Q17: Because the subclass is more specialized than
Q18: A protected member of a class may
Q19: Inheritance involves a subclass, which is the
Q20: Which of the following is the operator
Q22: In the following statement, which is the
Q23: Because every class directly or indirectly inherits
Q24: Which of the following statements declares Salaried
Q25: All methods specified by an interface are
Q26: If a subclass constructor does not explicitly