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 form 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
Q12: In an inheritance relationship, the subclass constructor
Q31: In a class hierachy
A) the more general
Q31: If a superclass does not have a
Q32: Look at the following code.What is missing
Q34: Look at the following code. Which line
Q35: A subclass can directly access:
A) all members
Q39: Protected members are
A) not quite private
B) not
Q55: Look at the following code: Line 1
Q58: Which of the following statements correctly specifies
Q59: Look at the following code: Line 1
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