Monday 24 July 2017

while example in java

public class Whileexample {
public static void main(String[] args) {
    int i=0;
    while(i<=5){
        System.out.println(i);
    i++;
    }
}
}




OUTPUT:
0
1
2
3
4
5

No comments:

Post a Comment