hi,can anybody give me understanding regarding RETURN,CONTINUE,BREAK keywords ....when they are used?how they are used? what are unlabeled statements and labeled statements... i need simple explaination of these keywords and their uses...
thank you
consider while loop
This loop is to skip processing when i=5...continue is used to skip further processing for current loop and continue from begining of loop.
--------------------------
consdier onother while loop
This code will start loop from i=10 to i=100..when i=100..it will come out of loop..
break statement is used in loop to break unconditionally out of the loop...
-----------------
return statement is used to return from running funciton...it can return value along.
conside method of java
here int is the return type of getValue function...this function on calling returns value 5