[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fIVyfjAJCFufORWdHH0fNBESDzJXzVQ6vaonRbjAOAhI":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":12,"question":19,"related":20,"source":30,"type":31},[],"2025-11-20 12:39:33",237805273,[8,9,10,11],"企鹅的名字是null健康值是10性别是雄","执行构造方法. 企鹅的名字是null健康值是0性别是null","企鹅的名字是null健康值是0性别是null","执行构造方法, 企鹅的名字是null健康值是10性别是雄",{"count":13,"courseId":14,"courseImg":15,"courseName":16,"workId":17,"workName":18},44,"426c00d91a93b0859d9b20c4df41e426","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002Fd9db2d5efddaa106e36cd224f3bb20e3.jpg","面向对象程序设计","work_48380806","作业6 VLAN&WLAN","下面Java代码的运行结果是( ). class Penguin { private String name = null; \u002F\u002F 名字 private int health = 0; \u002F\u002F 健康值 private String sex = null; \u002F\u002F 性别 public void Penguin() { health = 10; sex = &quot;雄&quot;; System.out.println(&quot;执行构造方法.&quot;); } public void print() { System.out.println(&quot;企鹅的名字是&quot; + name + &quot;,健康值是&quot; + health + &quot;,性别是&quot; + sex + &quot;.&quot;); } public static void main(String[] args) { Penguin pgn = new Penguin(); pgn.print(); } }",[21,32,41,50,59,68,77,84,93,96],{"answer":22,"createTime":5,"id":23,"options":24,"question":29,"source":30,"type":31},[],237805263,[25,26,27,28],"产生10个String实例","产生2个String实例","产生0个String实例","编译失败","如果有以下关于String[][]的程序代码: String[][] strs = new String[2][5]; 以下描述正确的是( )","v1",0,{"answer":33,"createTime":5,"id":34,"options":35,"question":40,"source":30,"type":31},[],237805264,[36,37,38,39],"建构Some时,可使用new Some()或new Some(10)形式","建构Some时,只能使用new Some()形式","建构Some时,只能使用newSome(10)形式","没有无自变量建构式,所以编译失败","如果有以下关于构造函数的程序片段: public class Some { public int x; public Some(int x) { this.x = x; } } 以下描述正确的是( )",{"answer":42,"createTime":5,"id":43,"options":44,"question":49,"source":30,"type":31},[],237805265,[45,46,47,48],"该程序没有任何编译错误","至少第4行和第5行定义的Dog方法冲突,出现编译错误","至少第6行和第9行定义的bark方法冲突,出现编译错误","至少第6行和第12行定义的bark方法冲突,出现编译错误","程序如下图,下面选项中对程序的分析,正确的是: \u003Cimg src=\"https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002Fc5d17d356507c19b7ee4cf285432417d.jpg\">",{"answer":51,"createTime":5,"id":52,"options":53,"question":58,"source":30,"type":31},[],237805266,[54,55,56,57],"one bark:5","one bark:10","one bark:20","two bark:20","程序如下所示,该程序的运行结果是: class Dog { String dogname; int age; Dog() { } Dog(String name) { dogname = name; } void bark(int count) { System.out.println(dogname + &quot; bark: &quot; + age); } } public class DogTest2 { public static void main(String[] args) { Dog g1, g2; g1 = new Dog(); g2 = new Dog(&quot;two&quot;); g1.dogname = &quot;one&quot;; g2 = g1; g1.age = 10; g2.age = 20; g1.bark(5); } }",{"answer":60,"createTime":5,"id":61,"options":62,"question":67,"source":30,"type":31},[],237805267,[63,64,65,66],"2","3","0","1","以下代码段将创建几个对象? String s1=&quot;bc&quot;;String s2=&quot;bc&quot;",{"answer":69,"createTime":5,"id":70,"options":71,"question":76,"source":30,"type":31},[],237805269,[72,73,74,75],"System.out.println(a.i)","a.method1()","A.method1()","A.method2()","假设A类有如下定义,设a是A类的一个实例,下列语句调用哪个是错误的?( ) class A{ int i; static String s; void method1() { } static void method2() { } }",{"answer":78,"createTime":5,"id":79,"options":80,"question":83,"source":30,"type":31},[],237805270,[65,81,82,63],"6","11","下面程序中类ClassDemo中定义了一个静态变量sum,分析程序段的输出结果.( ) class ClassDemo { public static int sum=1; public ClassDemo() { sum = sum + 5; } } public class ClassDemoTest{ public static void main(String args[]) { ClassDemo demo1=new ClassDemo(); ClassDemo demo2=new ClassDemo(); System.out.println(demo1.sum); } }",{"answer":85,"createTime":5,"id":86,"options":87,"question":92,"source":30,"type":31},[],237805272,[88,89,90,91],"x是整数类型变量,y是整数类对象","x是整数类对象,y是整数类型变量","x和y都是整数对象并且其值相等","x和y都是整数类型变量并且其值相等","关于下面两条赋值语句,正确的说法是( ). int x=Integer.parseInt(&quot;9999&quot;); int y=Integer.valueOf(&quot;9999&quot;).intValue()",{"answer":94,"createTime":5,"id":6,"options":95,"question":19,"source":30,"type":31},[],[8,9,10,11],{"answer":97,"createTime":5,"id":98,"options":99,"question":104,"source":30,"type":31},[],237805276,[100,101,102,103],"没有任何结果输出","如来,5600","编译出错","5600,如来","运行下面程序,输出结果是( ). \u002F\u002F定义 Person 类 class Person { \u002F\u002F成员变量 private String name; private int age; \u002F\u002F定义私有化的空构造方法 private Person() { } \u002F\u002F定义公有构造方法初始化 name 和 age public Person(String name, int age) { this.name = name; this.age = age; } public void show() { System.out.println(this.name + &quot;,&quot; + this.age); } } public class Demo { public static void main(String[] args) { Person p1 = new Person(); Person p2 = new Person(&quot;如来&quot;, 5600); p2.show(); } }"]