下面代码段, 哪行将引起一个编译时错误 public class Test23 { int n = 0; int m = 0; public Te
A、public Test(int a) { m=a; }
B、j=3;k=5;
C、t1=new Test23();
D、t2=new Test23(k);
A、public Test(int a) { m=a; }
B、j=3;k=5;
C、t1=new Test23();
D、t2=new Test23(k);
A、第1 行声明的param 参数未在方法内使用。删除该参数;
B、第3 行修改为:using( Resource r1 = new Resource(100);) {
C、删除第5 行
D、第5 行修改为:r1=r0;
1)public class Test {
2)int m, n;
3)public Test() ()
4)public Test(int a) {m=a; }
5)public static void main(string arg[]) {
6)Test t1,t2;
7)int j,k;
8)j=O; k=0;
9)t1=rlew Test();
10)t2=new Test(j,k);
11)}
12)}
在编译时行将导致一个错误。
A.3 B.5 C.6 D.10
A、O(n)
B、O(n^2)
C、O(log n)
D、O(n^3)
A、编译运行后无任何输出
B、编译运行后输出 age=1
C、编译运行后输出 age=0
D、编译出错
A、public void amethod(int i) throws Exception {}
B、public void amethod(int i) { }
C、public void amethod(long i) { }
D、public void amethod(long i) throws Exception {}
A、变量被设置为4
B、变量被设置为2
C、变量被设置为0
D、编译不通过
A、http://127.0.0.1/test/prog
B、http://127.0.0.1/case/test
C、http://127.0.0.1/case/prog/test/circle
D、http://127.0.0.1/case/prog/circle/test
public class Person{
static int arr[] =new int[10];
public static void main(String a[]) {
System.out.println(arr[1];)
}
}
以下叙述对的是______。
A.编译时将发生错误 B.编译时正确但是运行时出错
C.输出为0 D.输出为null
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!