Look at 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) 4
B) 5
C) 10
D) 11
Correct Answer:
Verified
Q29: Given the following code which of the
Q30: Look at the following code. Line 1
Q31: If a superclass does not have a
Q33: In the following statement, which is the
Q35: A subclass can directly access:
A) all members
Q36: All fields declared in an interface:
A) are
Q37: A subclass may call an overridden superclass
Q37: If a class contains an abstract method:
A)
Q38: Look at the following code. Which line
Q39: Protected members are:
A) not quite private
B) not
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents