From 829e0eaa76fede6192149c284c9c70a7eab77c50 Mon Sep 17 00:00:00 2001 From: Manjur Alam Middey <68458807+manjur29@users.noreply.github.com> Date: Thu, 15 Oct 2020 12:49:55 +0530 Subject: [PATCH] Create Do While Loop --- src/main/java/com/ordestiny/tdd/loop/Do While Loop | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/com/ordestiny/tdd/loop/Do While Loop diff --git a/src/main/java/com/ordestiny/tdd/loop/Do While Loop b/src/main/java/com/ordestiny/tdd/loop/Do While Loop new file mode 100644 index 0000000..f255cb7 --- /dev/null +++ b/src/main/java/com/ordestiny/tdd/loop/Do While Loop @@ -0,0 +1,13 @@ +// This a code for print all value of x with increasing 1 and upto 20 +public class Test { + + public static void main(String args[]) { + int x = 10; + + do { + System.out.print("value of x : " + x ); + x++; + System.out.print("\n"); + }while( x < 20 ); + } +}