example of simple for loop in Java Example: for loop java for (int i = 0; i < 5; i++) { System.out.println(i); }