how to make a loop in java

Java
for (int i = 0; i < 3; i++) {}

Source

Also in Java: