Java While Loop

Java While Loop

Java While Loop is used to execute a program code many times which is not fixed.

Syntax:

Java While Loop

Java While Loop Example

 

Output


 Infinitive Java While Loop

if you pass true as a condition in Java While Loop, it becomes an infinitive loop.

Syntax:

Example 

Output:

Next Post: Java Do-While Loop

nextprevious

About the Author: Eric K

Kenyan Developer and Blogger with Interests in Java,Javascript,Node.js, Wordpress, Android, PHP and Making Money Online. Solving world problems through programming is my passion. Hire me: Email : kawi3462@gmail.com