Hi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help.
Problems with java loops
Collapse
X
-
Tags: None
-
Check out this tutorial for Sun's tutorial of loops in Java.Originally posted by ray2007colonHi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help. -
you can write some sample code,try to execute it.post the erros and sample code... then it will be easier to show you right way.Originally posted by ray2007colonHi, I have a confusion with java loops, I’m a student and I don’t understand how after you are at the end of the program loop back to the middle, to do a step again. I don’t understand where to put the loop. I tried, while, do while and if else, but I’m very confuse. Please help.Comment
-
if-else are just blocks and not loops.Originally posted by hirak1984you can write some sample code,try to execute it.post the erros and sample code... then it will be easier to show you right way.
loops are those loop back till the given condition holds true.
for,while and do-while each have their own conditions checked during the iterations. Go thru the references available online or a basic java book.Comment
Comment