Java Learning Made Easy by Dheeraj Mehrotra - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

While Statement of JAVA

02013.jpg02014.jpg02015.jpg02016.jpg

The while statement is another looping statement of Java with an entry control option for execution.

02017.jpg02018.jpg

It acts as one of the simplest looping structures of Java and has the following format.

02019.jpg02020.jpg02021.jpg

Initialization;

02022.jpg02023.jpg

while (test expression)

02024.jpg

{

02025.jpg

body of the loop

02026.jpg

}

02027.jpg

where the test expression is the conditional state which executes the

02028.jpg

body of the loop if it returns the true value and terminates once the

02029.jpg

value returned for the test condition is false. It acts as an entry

02030.jpg

controlled loop and the given test expression is evaluated at every

02031.jpg

execution of the body of the loop.

02032.jpg02033.jpg02034.jpg02035.jpgattention@computerscienceexpertise.com

 

02036.jpg02037.jpg02038.jpg02039.jpg02040.jpg02041.jpg02042.jpg02043.jpg02044.jpg02045.jpg02046.jpg02047.jpg02048.jpg02049.jpg02050.jpg02051.jpg02052.jpg02053.jpg02054.jpg02055.jpg02056.jpg02057.jpg02058.jpg