Search This Blog

UI/UX Design | Web Development | Mobile Application Development

Whether you need UI/ UX design, web development services, or mobile app development services, Qaabil Digitals will be more than happy to help you. We work with top software developers, designers, and project managers. We tailor our services to suit your exact needs. We closely look at your company, listen to your story, and bring about the best ideas and solutions that can help you drive solid results. We don’t just produce work that works. We produce work that matters. Get a quote now Or Talk to us

Monday 27 June 2011

While loop in java


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.

1 comment:

  1. Hi mates, how is all, and what you want to say regarding this piece of writing, in my view its actually awesome in support
    of me.
    Feel free to visit my web-site ... http://taxreliefcompany.org/

    ReplyDelete

Share