Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок- 2
Plz any one make program on break and continue statement in java
5 ответов
+ 4
Ashutosh Pandey
Always do your own work but if you want to understand then I can explain.
break used to stop further execution of loop and loop can be any.
continue used to skip current iteration of loop.
For example:
for (int i = 0; i < 5; i++) {
if (i == 2)
continue;
if (i == 4)
break;
System.out.println("i = " + i);
}
Here i = 2 will not be print because of continue
i = 4 will not be print because of break. Loop will be terminate.
https://code.sololearn.com/cl42ogoP86gK/?ref=app
+ 3
Ashutosh Pandey Just keep in mind the golden rule; "do your own work instead of begging for answers".
+ 3
Ashutosh Pandey You should understand the fact that we are not here to provide you with the answers to your assignments. Your question is vague. Try modifying your post along with a tagged attempt of yours. I hope that this helps. Happy coding!
+ 2
"nope " * 69 times
+ 1
Thankyou