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
Q16: What key word can you use to
Q17: Look at the following code and determine
Q18: If ClassA extends ClassB, then:
A) public and
Q19: When a method is declared with the
Q20: Which of the following statements declares Salaried
Q22: Look at the following code. Which line
Q23: Look at the following code. Line 1
Q24: In the following code, what will the
Q25: Look at the following code. What is
Q26: What is wrong with the following code?
Public
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