Like other languages java has 3 basic loops and one advance loop.
For Loop:
i) first part is initial value assignment.
ii) 2nd part is condition to be checked.
iii) 3rd part is increment or decrement
int count=0;
for(int i=0;i<10;i++)
{
count++;
}
System.out.println("Count : "+count);
No comments:
Post a Comment