Q85 If you ran the following program, which lines would be included in its output? class Question {' H- X/ Q$ z% t; `
public static void main(String[] args)/ ~/ A v r$ ?7 A
{3 n3 v$ a. N4 F# M _) B
int i = 1;4 s, I; V$ u$ i5 N- ~9 {
int j = 2;
& O$ v0 a2 h1 R8 N$ R9 c& t1 d7 t9 A outer: while (i1 K3 _; ~' I3 g0 u. N0 F& u7 C; B, F
++i;
- B& p* T- l6 V+ n: s. e inner: do {6 W, ~! A0 \7 X% i
++j;
/ r4 j3 ~; ?$ _% ~ if(i++ % 3 ==2) break inner;' O6 _: A8 z& ^5 P' }% \
else if(j++ %3 ==1) break outer;1 B1 a$ s9 x! _" b# `! E
System.out.println(i*j);4 f$ \# R, |' Z; L) \
} while (j < i );! A* B) D8 S. s& N
System.out.println(i+j);- G3 W6 m* g6 u$ v
}: N) Q6 Z, s2 h% p- ]
}6 Y" a/ Q7 f- K( i# I7 S6 w
}) b# k. r. O4 }
A 5
$ u: o0 o) G' v B 6
. g( ^" K7 s0 f8 r1 ?% }- y C 73 b8 g/ w$ Z/ f
D The program does not display any output.
1 X) w7 c; I1 F- ^- K h D8 U/ L Q86 What is the preferred way to handle an object’s events in Java 2?
) W; A# Q# D& K- T) C A Override the object’s handleEvent() method.
/ o: b) `1 Y9 O6 o" c2 _9 v( l B Add one or more event listeners to handle the events.
+ `) M' ~. W& g# r' O8 O7 l# ? C Have the object override its processEvent() methods.
+ Y- H/ A9 k Z+ }' V D Have the object override its dispatchEvent() methods.( O9 B" P/ U& C) d1 I
Q87 What is wrong with the following for statement?
, `1 H( M0 X1 ?6 z+ K
7 |& d/ K8 r/ j# I for(i=0; j=0, i |