what is the general format of the for loop?
Answers
Answered by
1
Answer:
The format of a for loop in Java is:
for(initialization; condition; update)
{//statements;}
Example - for(int i = 1; i <= 5; i++)
{System.out.println(i);}
Output is 1, 2, 3, 4, 5
Similar questions