[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fcWu4dctN6IzVysdrt1LBbPHGoN8g-SyjCLxoMpP2zgY":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":8,"question":15,"related":16,"source":26,"type":109},[],"2023-06-02 21:08:52",42841629,[],{"count":9,"courseId":10,"courseImg":11,"courseName":12,"workId":13,"workName":14},82,"705281d4ac8dd1f61ed4e9e955d5932b","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F31fffd9b1ab8ed93a1abd0aec5eb6142.jpg","面向对象程序设计","exam_94245776","第三、四章复习(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,28,37,46,55,64,73,82,91,100],{"answer":18,"createTime":5,"id":19,"options":20,"question":25,"source":26,"type":27},[],42841553,[21,22,23,24],"int Sub(int x) {&hellip;&hellip;}","Sub Sub(int x) {&hellip;&hellip;}","void Sub(int x) {&hellip;&hellip;}","Sub(int x) {&hellip;&hellip;}","( )是类Sub的正确构造方法","v1",0,{"answer":29,"createTime":5,"id":30,"options":31,"question":36,"source":26,"type":27},[],42841554,[32,33,34,35],"包","接口","方法","对象","在Java程序中,( )是最基本的元素",{"answer":38,"createTime":5,"id":39,"options":40,"question":45,"source":26,"type":27},[],42841555,[41,42,43,44],"B.class","B.java","A.class","A.java","对于下面代码,正确的Java源程序文件名是( ). class A { void method1() { System.out.println(&quot;Method1 in class A&quot;); } } public class B { void method2() { System.out.println(&quot;Method2 in class B&quot;); } public static void main(String[] args) { System.out.println(&quot;main() inclass B&quot;); } }",{"answer":47,"createTime":5,"id":48,"options":49,"question":54,"source":26,"type":27},[],42841556,[50,51,52,53],"C x = new B( )","B x = new C( )","C x = new C( )","B x = new B( )","已知类B是类C的父类,则不正确的语句是( )",{"answer":56,"createTime":5,"id":57,"options":58,"question":63,"source":26,"type":27},[],42841557,[59,60,61,62],"sizeof","interface","extends","instanceof","采用( )运算符可以判断一个对象是否类的实例",{"answer":65,"createTime":5,"id":66,"options":67,"question":72,"source":26,"type":27},[],42841558,[68,69,70,71],"编译错误","Base method Child MethodB","Base method","Child methodB","编译运行如下Java代码,输出结果是( ). class Base { public void method(){ System.out.print (&quot;Base method&quot;); } } class Child extends Base{ public void methodB(){ System.out.print (&quot;Child methodB&quot;); } } public class Sample { public static void main(String[] args) { Base base= new Child(); base.methodB(); } }",{"answer":74,"createTime":5,"id":75,"options":76,"question":81,"source":26,"type":27},[],42841559,[77,78,79,80],"0","1","编译失败","2","有如下代码,则该程序运行时输出结果是( ). class Test{ public void show() { static int i=0; i++; System.out.println(i);; }} public class Test3 { public static void main(String[] args) { Test test=new Test(); test.show(); }}",{"answer":83,"createTime":5,"id":84,"options":85,"question":90,"source":26,"type":27},[],42841560,[86,87,88,89],"为对象返回一个引用","为对象分配内存空间","调用类的构造方法","产生一个新的类","( )不是Java语言中new操作符的作用",{"answer":92,"createTime":5,"id":93,"options":94,"question":99,"source":26,"type":27},[],42841561,[95,96,97,98],"Base Obj = new Base( )","Derived Obj = new Derived( )","Derived Obj = new Base( )","Base Obj = new Derived( )","Derived类是Base类的子类,下面( )语句是错误的",{"answer":101,"createTime":5,"id":102,"options":103,"question":108,"source":26,"type":27},[],42841562,[104,105,106,107],"可以使用&quot;对象.方法名&quot;来调用静态方法","需要先创建实例对象后才可以调用静态方法","静态方法并不属于调用它的对象,所以不能用静态方法来访问实例属性","可以使用&quot;类名.方法名&quot;来调用静态方法","关于静态方法的描述,错误的是( )",9]