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. For Loops in Java
Answer :
for(start-value;conditions;incremeant)
{
//statements
}
Examle
class ForLoopsDemo {
public static void main(String[] args){
for(int i=1; i<5; i++){
System.out.println("Number is: " + i);
}
}
}
{
//statements
}
Examle
class ForLoopsDemo {
public static void main(String[] args){
for(int i=1; i<5; i++){
System.out.println("Number is: " + i);
}
}
}
Posted By : aman
Most Viewed Questions