Java While Loop Example


Program
public class WhileLoop { public static void main(String[] args) { int i=1; while(i<=5){ System.out.println("Hello"); i++; } } }
Input
Output