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 |