+ 2

What exactly is continue?

In a if statement please tell me meaning of continue

6th Apr 2017, 2:21 AM
Maulik Bharatsinh Parmar
Maulik Bharatsinh Parmar - avatar
4 Respostas
+ 3
"continue" has nothing to do with "if". continue tells the computer to skip the remainder of the currently running loop and start with the next iteration.
6th Apr 2017, 2:25 AM
Igor B
Igor B - avatar
+ 3
In general If you tell your program to search an answer using loops or switch statements, it will find the answer if exists or will through an error as you written So what is the use of "continue" Its the way you are telling your program to continue even though it finds your answer we have another word "break" Its the way you are telling your program to stop or break when it finds your answer
6th Apr 2017, 4:27 AM
onekpsc
+ 2
its actually in a loop when you use continue, not if statement continue means basically skip that specific iteration. its easier if i give an example int i = 0; while (i < 5) { if (i == 3) { continue; } System.out.println (i); i++; } so this prints 0 1 2 4 5
6th Apr 2017, 2:25 AM
Edward
0
OK Thanks
6th Apr 2017, 9:08 AM
Maulik Bharatsinh Parmar
Maulik Bharatsinh Parmar - avatar