int x = 5;
while (x >= 0){
int y= 3;
while(y > 0) {
if (x<2) continue;
x--; y--;
System.out.println(x * y + " ");
}
}
How to guess the output of the following code?????
please help it compiles produce a output and goes infinitely....
But I can't understand this...
use of continue statement
Moderator: admin
-
- Posts: 14
- Joined: Thu Dec 22, 2016 8:55 pm
- Contact:
-
- Site Admin
- Posts: 10043
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: use of continue statement
You need to execute it step by step by jotting down the value of each variable at each step on a paper. When you practice more such examples, you will be able to do it mentally. There is no other way to solve such code problems.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 34 guests