Sunday, May 23, 2021

Do While Statement in Java

 In this tutorial I will show you how to declare and use do while statement using Java programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* Do_While_Statement.java

 * Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

 * www.jakerpomperada.com www.jakerpomperada.blogspot.com

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental Philippiens

 */

public class Do_While_Statement {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

    System.out.println();

        System.out.print("\tDo While Statement in Java ");

        System.out.println("\n");

        int a=1;  

        do{  

            System.out.print(" " + a + " ");  

        a++;  

        }while(a<=20);  

        System.out.println("\n");

        System.out.print("\tEnd of Program");

        System.out.println();


}


}



No comments:

Post a Comment