public class ASuperClass
{
public ASuperClass()
{
System.out.println("In superclass constructor");
}
}
public class ASubClass extends ASuperClass
{
public ASubClass()
{
System.out.println("In subclass constructor");
}
}
public class DemoConstructors
{
public static void main(String[] args)
{
ASubClass child = new ASubClass();
}
}
Given the above code, what will the output be when DemoConstructors executes?
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q58: Match each term with the correct statement
Q59: Match each term with the correct statement
Q60: Match each term with the correct statement
Q61: What are the three types of methods
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