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 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
Get step-by-step solutions from verified subject matter experts
