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
Q25: In the following statement,which is the superclass?
Q26: In the following statement,which is the subclass?
Q27: When one object is a specialized version
Q28: What is wrong with the following code?
Q29: In the following statement,which is the interface?
Q31: In a class hierachy
A) the more general
Q32: Look at the following code.What is missing
Q39: Which of the following is true about
Q44: In an interface all methods have:
A) private
Q45: Protected class members are denoted in a
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