Question: B: Point out the error in the code and correct it. class Person { public void int display () { System.out.println(This is a Person);

B: Point out the error in the code and correct it. class 





B: Point out the error in the code and correct it. class Person { public void int display () { System.out.println("This is a Person"); } } class Student extnd Person { public void display () { System.out.println("This is a Student"); } } class MainClass { public static void main (String[] args) { Student s1 = new Student(); s1.display2 ; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!