| Author |
Question from jqplus
|
Sandhya Lever
Ranch Hand
Joined: Aug 15, 2005
Posts: 90
|
|
class Test { public static void main(String args[]) { int c = 0; A: for(int i = 0; i < 2; i++) { B: for(int j = 0; j < 2; j++) { C: for(int k = 0; k < 3; k++) { c++; if(k>j) break; } } } System.out.println(c); } } Options Select 1 correct option. 7 8 9 10 11 Here the correct answer is 10.Please help me understand the output of this code. Regards, Sandhya
|
SCJP | SCWCD |SCBCD |SCDJWS |SCEA
|
 |
Ramya Iyer
Ranch Hand
Joined: Jul 29, 2003
Posts: 66
|
|
[ October 06, 2005: Message edited by: Ramya Iyer ]
|
 |
Sandhya Lever
Ranch Hand
Joined: Aug 15, 2005
Posts: 90
|
|
|
Thanks,Ramya
|
 |
 |
|
|
subject: Question from jqplus
|
|
|