In the following code, what will the call to super do?
Public class ClassB extends ClassA
{
Public ClassB()
{
Super(40) ;
System.out.println("This is the last statement "+
"in the constructor.") ;
}
}
A) This cannot be determined from the code.
B) It will call the method super and pass the value 40 to it as an argument.
C) It will call the constructor of ClassA that receives an integer as an argument.
D) The method super will have to be defined before we can say what will happen.
Correct Answer:
Verified
Q19: When a method is declared with the
Q20: Which of the following statements declares Salaried
Q21: Look at the following code. The method
Q22: Look at the following code. Which line
Q23: Look at the following code. Line 1
Q25: Look at the following code. What is
Q26: What is wrong with the following code?
Public
Q27: When one object is a specialized version
Q28: In the following statement, which is the
Q29: Given the following code which of the
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