Multiple Choice
What is the output of running class C? class A {
Public A() {
System.out.println(
"The default constructor of A is invoked") ;
}
}
Class B extends A {
Public B(String s) {
System.out.println(s) ;
}
}
Public class C {
Public static void main(String[] args) {
B b = new B("The constructor of B is invoked") ;
}
}
A) none
B) "The constructor of B is invoked"
C) "The default constructor of A is invoked" "The constructor of B is invoked"
D) "The default constructor of A is invoked"
Correct Answer:

Verified
Correct Answer:
Verified
Q6: What is the output of running the
Q7: What is wrong in the following code?<br>Test
Q9: A subclass inherits _ from its superclass.<br>a.
Q10: The method _ overrides the following method:
Q11: Analyze the following code: public class Test1
Q11: When you implement a method that is
Q12: What exception type does the following program
Q13: The program has a syntax error because
Q14: Show the output of running the class
Q16: What is wrong in the following code?<br>Test