题目
阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println (arr[1]); } } 正确的说法是()。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第1题
阅读下列代码 public class { public static void main(String args[]){ double d=12.3; Decrementer dec=new Decrementer(); dec. decrement(D) ; System. out. println(D) ; } } class Decrementer{ public void decrement(double decMe){ decMe=decMe-1.0; } } 代码执行后输出结果是
A.12.3
B.11.3
C.13.3
D.-1.0
第2题
阅读下列代码 public class { public static void main(String args[]){ double d=12.3; Decrementer dec=new Decrementer(); dec. decrement(D) ; System. out. println(D) ; } } class Decrementer{ public void decrement(double decMe){ decMe=decMe-1.0; } } 代码执行后输出结果是
A.12.3
B.11.3
C.13.3
D.-1.0
第3题
阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是()。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第4题
阅读下列代码后public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); }}正确的说法是
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第5题
阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是()。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第6题
阅读下列代码后 public class Person{ int art[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是()。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第7题
阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第8题
阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println((3>2)?4:5); } } 其运行结果是
A.2
B.3
C.4
D.5
第9题
阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println(~(0xa5)&0xa
A.0xa5
B.10
C.0x50
D.0xaa
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!