Preview:
public class Main {
    public static void main(String[] args) {
      
        int i = 0;
        do {
            System.out.println("int i is equal to " +i);
            i++;
        }
        while (i < 5);
    }
}
/* Output:
int i is equal to 0
int i is equal to 1
int i is equal to 2
int i is equal to 3
int i is equal to 4
*/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter