Beginners – Java
Programming Made
Easy!
Recommended by 227 users
chart:
In this flowchart, the code will respond
in the following steps:
1. First of all, it will enter the loop where
it checks the condition.
2. If it’s true, it will execute the set of
code and repeat the process.
3. If it’s False, it will directly exit the
loop.
Now, let us see how you can implement
the code in IDE.
1
2 public class WhileExample {
public static void main(String args[]) {
3 int a=5;
4 while(a<10) //while condition
5 {
6 System.out.println("value of a" +a);
7 a++;
System.out.println("\n");
8 }}
9 }
10
Share on
PREVIOUS
NEXT
Related Posts
What Is Java? – A Beginner’s Guide to Java and Its
Evolution
17K
Unveil the Magic of Java Course with Edureka!
2K
Comments
7 Comments
Roshini Chandri
Very useful tutorials and very easy to
understand. Keep Rock. Thank you.
João Luís
I Aayushi Johari.
Yes thanks a lot for the tutorials :-)
o EdurekaSupport
Hey Joao! Thank you for appreciating
our work. Do check out our website t
know more about the