Question: What will the following code print when compiled and run? If it gives a compilation error, please explicitly mention the reason for the error?

 What will the following code print when compiled and run? If it gives a compilation error, please explicitly  

What will the following code print when compiled and run? If it gives a compilation error, please explicitly mention the reason for the error? class Person { Person () { } System.out.println("Person class Constructor"); } class Student extends Person ( Student () ( System.out.println ("Student class Constructor"); super(); class Test public static void main(String[] args) Students new Student ();

Step by Step Solution

3.36 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The code presented in the image contains a compilation error in the Student class constructor In Ja... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!