Do-While Loop

 package com.company;

import java.util.Scanner;


public class tuts {

    public static void main(String[] args) {

//        int a = 10;

//        do {

//            System.out.println(a);

//            a++;

//        }while (a<5);


        int c = 1;

        do {

            System.out.println(c);

            c++;

        }while(c<=45);


    }

}


Comments

Popular posts from this blog

Creating a Thread by Extending Thread class

Constructors from Thread class in Java