a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 60|回复: 0

[考试试题] 2011年JAVA认证模拟题第二阶段(15)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q43.What is written to the standard output given the following statement 1. System.out.println(4 | 7);  a. 4
1 s! p  c2 C& I' m4 n3 p  b. 5
2 C! q5 ~" d5 K7 b4 c0 Y8 W' r! Q  c. 6
4 H* V& d2 D3 T9 f; A  d. 7
; H+ i6 T% ]4 x& }9 P7 g  Q44.What expressions are true concerning the following lines of code?/ Q. p& x! Z. A  F  W; k
  1. int[] arr = {1, 2, 3};; ~! J) W1 {$ m" D% V  Q
  2. for(int i = 0 ; i < 2; i++)
3 J6 W9 J3 M, t+ Q8 j7 R  3. arr = 0;
" a2 @6 o) s  y) {9 v' V# C1 F  Select all valid answers.7 _" H7 Q& Q  l8 @7 T
  a. arr[0] == 0
3 _5 e' p1 c; W. |8 C9 [$ ^  b. arr[1] == 2
& x! y2 N. E) w- q  c. arr[1] == 0% B  V% N4 n6 H# f
  d. arr[2] == 3
2 E2 h/ t! [+ `5 t  Q45.What will the following block of code write to standard output when it is executed?4 A4 s; L* ]- f. {( [3 o# K
  1. int i = 3;
2 \+ q/ c4 U, e6 z  2. int j = 0;
3 i: @1 |# K0 b: z& e  f  3. double k = 3.2;$ r+ J% Y2 }4 [1 L3 {
  4. if (i < k)3 U' l" p1 ?) a* p9 ^3 g
  5. if (i == j)
* l( l, e; A* i  6. System.out.println(i);/ Q1 W- w7 K% ^9 U
  7. else
5 B+ `7 S! a2 I  8. System.out.println(j);
2 n0 K7 b& @0 w% z  9. else9 h: l+ M+ y& ^
  10. System.out.println(k);9 S' U9 Y* V, {4 [1 y
  a. 3
6 ~+ h3 b3 B8 c0 R+ e  b. 0
) B1 U8 s" O& H4 q( U; S( O! g, o  c. 3.2
9 o/ s. u( m3 E& V5 c! t  d. None of these.
( A+ `$ D4 \( N' y6 y& G  43. d4 t2 {6 \3 ^3 [1 t, b
  44. acd
# @- ~; _3 ]- V+ d2 t3 z  45. b
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-17 22:26 , Processed in 0.659011 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表