Consider the following program, including the given class hierarchy. Select ALL of the following calls which will successfully add an element to the layout ArrayList defined in MainClass. public class Person { } public class Student extends Person { } public class Teacher extends Person { } public class Room { } public class Classroom extends Room { } public class Office extends Room { } public class Hallway extends Room { } public class MainClass { private static ArrayList<Room> layout = new ArrayList<Room>(); public static void main(String[] args) { /* MISSING CODE */ } } (You may assume all classes listed have access to a default, no-argument constructor.)多项选择题

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!