2025年11月21日 在switch(expression)语句中,expression的数据类型不能是? A.char B.boolean C.byte D.double 在switch(expressi... 进一步了解 未分类
2025年11月21日 设有如下代码:int[]x=newint[25];执行后,以下哪个说法正确? re 第五章单元测试 A.x[24] 为 0 B.x.length 为 25. C.x[0] 为null. D.x[25] 为 0. 设有如下代码:int[]x=ne... 进一步了解 未分类
2025年11月21日 哪些赋值是合法的?re A.double d = 0x12345678; B.int other = (int)true; C.long test = 012; D. float f = -412; 哪些赋值是合法的?re A.do... 进一步了解 未分类
2025年11月21日 设有如下程序,其调试结果为:class Q2 { public static void main(String[] args) { int[] seeds = {1,2,3,4,6,8}; int n= seeds.length; for (int i = 0; i < 3; i++) for (int k = 0; k< n-1; k++) seeds[k]= seeds[k+1]; for (int i = 0; i 设有如下程序,其调试结果为:cl... 进一步了解 未分类
2025年11月21日 设有如下代码:interface IFace{ }class CFace implements IFace{ }class Base{ }public class ObRef extends Base{ public static void main(String argv[]){ ObRef obj = new ObRef(); Base b = new Base(); Object obj1 = new Object(); IFace obj2 = new CFace(); //Here }}则在 //Here处插入哪个代码将不出现编译和运行错误。 A.b=obj; B.obj1=obj2; C.obj=b; D.obj1=b; 设有如下代码:interface... 进一步了解 未分类
2025年11月21日 给出下面的不完整的类代码: class Person { String name, department; int age; public Person(String n){ name = n; } public Person(String n, int a){ name = n; age = a; } public Person(String n, String d, int a) { // doing the same as two arguments version of constructor // including assignment name=n,age=a department = d; } } 下面的哪些表达式可以加到构造方法中的”doing the same as…”处? A.this(n,a); B.this(name,age); C.name=n;age=a; D.Person(n,a); 给出下面的不完整的类代码: cl... 进一步了解 未分类