Category
- Php
- JAVA
- DOTNET
- Vbscript
- C
- vb
- html
- Mysql
- Oracle
- sql
- Db
- Computer
- Commerce
- Business
- Arts
- Cashier
- Audit
- Banking
- Accounts
- Math
- Physics
- Biology
- Others
Home >> Asked Questions >> JAVA
Q. Do While Loop in Java
Answer :
do
{
//statements
} while(Condition);
Examle
class DoWhileLoopsDemo {
public static void main(String[] args)
{
int i=0;
do
{
i++;
} while(i<10);
System.out.println("Number is: " + i);
}
}
{
//statements
} while(Condition);
Examle
class DoWhileLoopsDemo {
public static void main(String[] args)
{
int i=0;
do
{
i++;
} while(i<10);
System.out.println("Number is: " + i);
}
}
Posted By : aman
Most Viewed Questions