While Loop In Java

package com.company;

import java.util.Scanner;


public class tuts {

    public static void main(String[] args) {

        int i = 100;

        while (i<=200){

            System.out.println(i);

            i++;

        }

        System.out.println("Printed Natural Numbers from 100-200");


    }

}

 

Comments

Popular posts from this blog

Creating a Thread by Extending Thread class

Constructors from Thread class in Java