Loops are used to execute code repeatedly.
for (int i = 0; i < 5; i++) { System.out.println(i); }
int i = 0; while (i < 5) { System.out.println(i); i++; }
int i = 0; do { System.out.println(i); i++; } while (i < 5);