The Future Is Behind You

Do While Loop

The Do While loop performs whatever is in the code block until the condition is met.

public class DoWhile {
  public static void main(String[] args) {
    int i = 0;

    do {
      System.out.println(i);
      i++;
    } while (i <= 10);
  }
}

The output from the above is as follows:

0
1
2
3
4
5
6
7
8
9
10

a = b = c