Examlex

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?


Definitions:

Verbal Flourishes

Decorative language features added to speech or writing to make it more interesting or persuasive.

Sound Bites

Short, catchy excerpts from a speech or statement made for the purpose of media broadcasting.

Backchannel

A social media conversation that takes place during a presentation, in parallel with the speaker’s presentation.

Arouse Interest

To stimulate curiosity or attract attention towards something.

Related Questions