A comma separates the variables
They must be of the same type.
Variables declared in the for statement are all local to the for loop
public class MainClass{
public static void main(String[] argv){
for (int i = 0,j = 0; (i<10) && (j<10); i++, j++) {
System.out.println("i is " + i + " j is " +j);
}
System.out.println();
}
}
i is 0 j is 0
i is 1 j is 1
i is 2 j is 2
i is 3 j is 3
i is 4 j is 4
i is 5 j is 5
i is 6 j is 6
i is 7 j is 7
i is 8 j is 8
i is 9 j is 9