Plz any one make program on break and continue statement in java | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 2

Plz any one make program on break and continue statement in java

24th Aug 2021, 4:19 PM
Shashank
Shashank - avatar
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
24th Aug 2021, 4:31 PM
A͢J
A͢J - avatar
+ 3
Ashutosh Pandey Just keep in mind the golden rule; "do your own work instead of begging for answers".
24th Aug 2021, 4:25 PM
Calvin Thomas
Calvin Thomas - avatar
+ 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!
24th Aug 2021, 4:31 PM
Calvin Thomas
Calvin Thomas - avatar
+ 2
"nope " * 69 times
24th Aug 2021, 4:36 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 1
Thankyou
24th Aug 2021, 4:40 PM
Shashank
Shashank - avatar