While loop:
The while loop is java's most fundamental looping statement. It is very easy and powerful loop of java.It repeats a statement or block while its Boolean expression is true. This Boolean expression controls the loop.
Syntax:
while (condition)
{
//body of the loop
}
The body of the loop will be executed till the conditional expression is true. When conditional expression comes false the control passes to the next statement right after the body of the loop. Always remember, in while loop first of all conditional expression is evaluated if it is true then body of the loop will be executed. If it becomes false at the beginning then body of the loop will not be executed, even once.
Curly braces are not important if you have only one statement to repeat but using curly braces is a good habit. Another point you should know that the body of while loop can be empty.
Hi mates, how is all, and what you want to say regarding this piece of writing, in my view its actually awesome in support
ReplyDeleteof me.
Feel free to visit my web-site ... http://taxreliefcompany.org/