what does : do in a loop in java code example
Example 1: for loop in java
// for loop in java
public class ForLoop
{
public static void main(String[] args)
{
for(int x = 1; x <= 5; x++)
{
System.out.println(x);
}
}
}
Example 2: java loop
for (int i = 0; i < 10; i++) {
System.out.println(i);
}