I need a program in java | Sololearn: Learn to code for FREE!

0

I need a program in java

If a program run in for loop than that program doesn't run in while loop. Or if that same program run in while loop that doesn't run in for loop. (these two condition will satisfy in one program)

8/14/2022 7:25:27 AM

Prince Raj

2 Answers

New Answer

+2

If I understand what you want correctly, you could add a boolean condition in each loop that once the loop is used, the boolean changes and doesn't allow the next loop to execute.

+2

Loops will be covered in the sololearn Java course: https://www.sololearn.com/Course/Java/?ref=app It is not clear to me what you try to achieve.