[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fak-shh7zAC6FDRzY9MzjgZqqcGMS4k4HleELBju0KGk":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":8,"question":15,"related":16,"source":27,"type":110},[],"2026-05-26 04:15:18",249290982,[],{"count":9,"courseId":10,"courseImg":11,"courseName":12,"workId":13,"workName":14},59,"f08bc3b25f74db5e872af5c626cef1a5","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F50df1640528a3d76f0004bffacf118c9.png","Java程序设计（首批国家级一流本科课程）","7821d5ea210144a9b98063face41bbc3","7.1 继承小测验","请阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Eye {\u002F\u002F 猫的眼睛类 private String color; public Eye(String color) { this.color = color; }}class Cat {\u002F\u002F 猫类 private String name; private Eye eye; public Cat(String name, Eye eye) { this.name = name; this.eye = eye; } public boolean equals(Object obj) { Cat cat = (Cat) obj; if (this.name.equals(cat.name) &amp;&amp; this.eye == cat.eye) return true; return false; }} public class CatDemo { public static void main(String[] args) { Eye e1=new Eye(&quot;蓝色&quot;); Eye e2=new Eye(&quot;蓝色&quot;); Cat tom=new Cat(&quot;Tome&quot;,e1); Cat jack=new Cat(&quot;Jack&quot;,e2); System.out.println(tom==jack); System.out.println(tom.equals(jack)); }}",[17,29,38,47,56,65,74,83,92,101],{"answer":18,"createTime":19,"id":20,"options":21,"question":26,"source":27,"type":28},[],"2023-05-10 21:08:00",4758285,[22,23,24,25],"equals()","clone()","toString()","hashCode()","(7-1)覆写Object中的( )方法使对象能够返回有价值的信息","v1",0,{"answer":30,"createTime":19,"id":31,"options":32,"question":37,"source":27,"type":28},[],4758286,[33,34,35,36],"继承关系","包含关系","关联关系","无关系,上述类定义有语法错误","(7-1)定义如下Person类和Student类,则这两个类的关系是( ).\u003Cimg src=\"https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F289f731f16da384d79c70afc3f7f2303.jpg\">",{"answer":39,"createTime":19,"id":40,"options":41,"question":46,"source":27,"type":28},[],4758287,[42,43,44,45],"多重的","单重的","线程的","不能继承","(7-1)Java程序中,类之间的继承关系是( )",{"answer":48,"createTime":19,"id":49,"options":50,"question":55,"source":27,"type":28},[],4758288,[51,52,53,54],"interface","package","extends","class","(7-1)在定义子类时,声明父类的关键字是( )",{"answer":57,"createTime":19,"id":58,"options":59,"question":64,"source":27,"type":28},[],4758289,[60,61,62,63],"子类能继承父类的私有成员变量和成员方法","子类能继承父类的非私有成员变量和成员方法","子类只能继承父类public成员变量和成员方法","子类只能继承父类的成员方法,而不继承成员变量","(7-1)关于继承的说法,正确的是( )",{"answer":66,"createTime":19,"id":67,"options":68,"question":73,"source":27,"type":28},[],4758290,[69,70,71,72],"Dog[] a = new Dog[5]; a[0] = new Cat()","Animal a = new Animal[5];a[0] = new Animal()","Dog[]a = new Dog[5];a[0] = new Animal()","Cat[]a = new Cat[5];a[0] = new Cat()","(7-1)定义了Animal类、Cat类和Dog类,则( )代码段是正确的. class Animal{ }; class Cat extends Animal{} class Dog extends Animal{}",{"answer":75,"createTime":19,"id":76,"options":77,"question":82,"source":27,"type":28},[],4758291,[78,79,80,81],"B x = new B( )","B x = new C( )","C x = new C( )","C x = new B( )","(7-1)已知类B是类C的父类,则不正确的语句是( )",{"answer":84,"createTime":19,"id":85,"options":86,"question":91,"source":27,"type":28},[],4758292,[87,88,89,90],"print( )","super.print( )","super.super.print( )","new C( ).print( )","(7-1)定义了如下的A、B和C类,则( )语句在①处能正确调用类C中的print( )方法.class C{ void print() {}}class B extends C{ void print() { }}class A extends B{ void print() { } void show() { ① }}",{"answer":93,"createTime":19,"id":94,"options":95,"question":100,"source":27,"type":28},[],4758293,[96,97,98,99],"子类定义了自己的构造方法,就不会调用父类的构造方法","子类必须通过super关键字调用父类的构造方法","如果子类的构造没有通过super调用父类构造方法,那么子类会先调用父类不含参数的构造方法,再调用子类自己的构造方法","创建子类对象时,先调用子类自己的构造方法,然后调用父类的构造方法","(7-1)关于子类调用父类的构造方法,正确的说法是( )",{"answer":102,"createTime":19,"id":103,"options":104,"question":109,"source":27,"type":28},[],4758294,[105,106,107,108],"Base Obj = new Derived( )","Derived Obj = new Base( )","Base Obj = new Base( )","Derived Obj = new Derived( )","(7-1)Derived类是Base类的子类,下面( )语句是错误的",9]