定义类间关系如下,对象定义实例化正确的是( )。 public class Person{ }public class Student extends Person{ }public class Worker extends Person{ }
选项:
A:Person p1 = new Person();
B:Person p2 = new Student();
C:Student p3 = new Student();
D:Student p4 = new Person();
发布时间:2024-06-19 15:27:21