Example of While loop in java
public class WhileLoopJava { public static void main(String[] args) { int i=0; while(i<10) { i++; System.out.println("While Loop :"+i); } } }
output
While Loop :1
While Loop :2
While Loop :3
While Loop :4
While Loop :5
While Loop :6
While Loop :7
While Loop :8
While Loop :9
While Loop :10
Tags: Java Statements, Programs





Link to Us