a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 57|回复: 0

[考试试题] 2011年JAVA认证模拟题(38)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q112 Which of the following are true?# V( u( ?. j; w8 |
  A A Dialog can have a MenuBar.; Y0 ?1 I/ l1 x! S1 C) v2 K
  B MenuItem extends Menu.& V  Z$ w; J4 T& B; C) L
  C A MenuItem can be added to a Menu.! p" u1 \- P+ d5 \
  D A Menu can be added to a Menu.
$ d' T* ]1 ^! `: i" Q: }$ b$ V  \+ M  Q113 Which method is used to s et the text of a Label object?2 }$ k' R) n/ Y! N5 M! V' l% o
  A setText(). y5 d/ M6 J$ L9 _5 t# {1 ^, m
  B setLabel()/ _' h! u3 R) y( P' U
  C setTextLabel()4 y# B- p/ o* b$ ~
  D setLabelText()
- k" x! _& Z; [. p1 O  Q114 What is the output of the following program?
- F# Z" }* a8 f4 o% s* [  class Question {
# v7 L2 i: |2 ?  static int i = 1, j = 2;! W' A; h3 `, x' j) V+ H( L
  static {
) i9 |2 N1 G7 [% _  display(i);
- z" K3 T3 r. k8 G  }/ k  C" K7 p' ]' b
  public static void main (String[] args)
* M3 v1 S1 ^: Y  {
) ?6 l+ m$ h. q  display(j);
, k5 m9 U& P* U; i  }
% T7 E- i. d: S  static void display(int n) {
3 P) z/ W* V" s: A  System.out.print(n);, V- z" ]# U0 ^6 M) z
  }2 g7 j6 o; w  y, J9 H' k
  }
% n# m* x2 S0 T/ {* Y& @  A 1* D" }) }, |5 `# o
  B 2
/ E& v# u) v8 ~; C/ J! x# Y  C 12+ Q- G. _9 t0 @+ N" n& @. M
  D 21
2 u1 N' L' p# j# Y  ]  Q112 CD
- I+ i0 f9 s3 Z/ O9 Y1 J! Y, V6 e  Q113 A+ e; k- G- T' y5 V% c
  Q114 C
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-21 12:10 , Processed in 0.268611 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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