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
Q44: In the following code, which line in
Q45: In the following code, what is missing
Q46: Protected class members can be denoted in
Q47: Which of the following statements declares Salaried
Q48: If ClassC is derived from ClassB which
Q50: In the following statement, which is the
Q51: In the following code, which line has
Q52: Given the following code, which statement is
Q53: Given the following code: Line 1 public
Q54: What is wrong with the following code?
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