MyClass.java
 

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

Result:
0
1
2
3
4