Please see below code for “For”  Loop Now

				
					package practice;

public class ForLoop {

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

	}

}

				
			

Explaination

 

0
1
2
3
4
5

Scroll to Top