- 2

Loops

Can anyone please explain the while loop for me

12th Oct 2020, 4:05 PM
Andiswa
5 Réponses
+ 2
Have you got through this? This is part of the tutorial, I don't know what else to explain but what was already explained there. https://www.sololearn.com/learn/Java/2146/?ref=app
12th Oct 2020, 4:36 PM
Ipang
+ 1
Ok, practice sounds like a good idea 👍
12th Oct 2020, 4:41 PM
Ipang
+ 1
Andiswa It is a part of Control statements. A while loop allows code to be executed repeatedly until a condition is satisfied. If the number of iterations is not fixed, it is recommended to use a while loop. It is also known as an entry control loop. while(condition) { // Body of while loop } Firstly, the condition will be evaluated: If it returns true, then the body of the while loop will be executed. In the body of while loop the statements contain an update value for the variable being processed for the next iteration. If it returns false, then the loop terminates which marks the end of its life cycle. For more details: https://javagoal.com/while-loop-java/
12th Oct 2020, 4:43 PM
Raina Dhankhar
Raina Dhankhar - avatar
0
I did, i guess need m0re practice on loops
12th Oct 2020, 4:39 PM
Andiswa
0
Raina Dhankhar thank you I'll follow the link just now
12th Oct 2020, 4:51 PM
Andiswa