Solved

​ Public Class ASuperClass

Question 47

Essay

​ 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:

verifed

Verified

The output will be: ...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions