java program for 1 to 10 print using while loop

 program- 


public class Main

{

    public static void main(String[] args)

    {

        int i=0;

        

        while ( i<10 )

        {

            i++;

            System.out.println(i);

            

        }

    }

}

Output :-

1

2

3

4

5

6

7

8

9

10

Comments

All time Best Post

Write a program that declares a class named Person. It should have instance variables to record name, age and salary. Use new operator to create a Person object. Set and display its instance variables.

IMAGE CRUD OPERATION USING EXPRESS MONGOOSE MULTER

express session login system using node express mongodb

connect websocket to binance api and store t he true value in the db

CRUD APP WITH SORT IN NODE EXPRESS AND MONGODB

Rock-Paper-Scissor Game in Pure JavaScript

how to delete image from the folder directly from a Request (MULTER)

calculate rsi