1. Consider the following incomplete definitions: public class A { /* ... */ } public class B extends A { /* ... */ } public class C extends B { /* ... */ } Which ... 展开
1. Consider the following incomplete definitions: public class A { /* ... */ } public class B extends A { /* ... */ } public class C extends B { /* ... */ } Which of the following statements are true?I. Both B and C inherit from A.II. Both B and C have A as their direct superclass.III. B and C are both subclasses of A.A. I onlyB. II onlyC. III onlyD. I and III onlyE. I, II, and III2. Which of the following statements are true?I. A subclass inherits all the public instance methods of its direct superclass.II. A subclass inherits all the private instance variables of its direct superclass.III. All classes inherit from the Object class.A. I onlyB. II onlyC. III onlyD. I and III onlyE. I, II, and III3. Consider the following code:public class Animal { public Animal() { } /* ... */ } public class Tiger extends Animal { public Tiger() { super();} /* ... */ } 收起