Question: QUESTION 28 Given the following code, find the compilation error. public class Test public static void main(String[] args) { Object o; Person p; o =
![class Test public static void main(String[] args) { Object o; Person p;](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5298fdac68_99166f5298f77e45.jpg)
QUESTION 28 Given the following code, find the compilation error. public class Test public static void main(String[] args) { Object o; Person p; o = new Person; o = new Student(); p=new Object(); p = new Person(); p=new Studento; } class Person extends Object { } class Student extends Person { } } class Person extends Object { } class Student extends Person { 3 } p= new Person() causes an error o = new Person() causes an error o p=new Object( causes an error O o = new Student() causes an error o p=new Student() causes an error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
