Mega Code Archive
Categories
/
Java Tutorial
/
Statement Control
A loop allows you to execute a statement or block of statements repeatedly
public class MainClass { public static void main(String[] args) { for (int i = 0; i < 8; i++) { System.out.println("Hi."); } } } Hi. Hi.