单项选择题
构造方法的作用是( )。
A.复制对象
B.初始化对象
C.对象赋值
D.回收对象
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序 public class Sun public static void main (String args[ ]) int x=0; int n=0; while (x<50) x=(x+2)*(x+3); n=n+1; System.out.println (n+ 和 +x); 上述程序的运行结果是( )。
A.1和0
B.2和72
C.3和50
D.4和168
点击查看答案&解析
单项选择题
下面程序的输出结果是( )。 public class Sun public static void main(String args[ ]) int[] a=new int[11]; int[] p=new int[4]; int k=5; for (int i=1; i<=10; i++) a[i]=i; for(int i=1;i<=3;i++) p[i]=a[i*i]; for (int i=1; i<=3;i++) k=k+p [i]*2; System.out.println (k);
A.33
B.28
C.35
D.37
点击查看答案&解析
相关试题
有如下程序 public class Sun public ...
下面程序的输出结果是( )。 public cl...
有如下程序 public class Sun public ...
下列各数据结构中不属于线性结构的是( )。
下列关于链式存储的叙述中正确的是( )。