We are about to switch to a new forum software. Until then we have removed the registration on this forum.
for example if my condition doesnot satisfies I have to repeat the execution of certain steps gain can any one please tell me how to do that..
Answers
Keyword
goto
was purposefully not implemented in Java!If your intention is restart a loop, just modify its iterator to some starting value!
or a do-while loop might suit you better than a while loop - it checks the condition after executing once, not before like tfguy's post. subtle difference.
http://docs.oracle.com/javase/tutorial/displayCode.html?code=http://docs.oracle.com/javase/tutorial/java/nutsandbolts/examples/DoWhileDemo.java
and both break and continue can use labels if that's what you need. (hard to quite tell from your question)
this is a simple program
remember that the function draw() in itself loops automatically - so we can also use this loop and just use a variable with if: