public class test { public static void main(String args[]) { for(int i = 0; i < 3; i++) { for(int j = 3; j <= 0; j--) { if(i == j) continue; System.out.println(i + " " + j); } } } } this program does ot giv an output. but iam unable to understand why. please explain thanks in adv, bhuvana
Bhuvana
Jonathan Jeban
Ranch Hand
Joined: Oct 08, 2000
Posts: 52
posted
0
Hi Bhuvana, Shouldn't the for loop should be like this? for(int j = 3;j >= 0; j--) {
Hope this helps.. Jeban [This message has been edited by Jonathan Jeban (edited October 31, 2000).]
Michael Hildner
Ranch Hand
Joined: Oct 13, 2000
Posts: 297
posted
0
Looks like a typo: for(int j = 3; j <= 0; j--) j starts off as three, so j<=0 is false. Try changing to >=0