>int i;
>for (i =7, int j = 0; i < 10; j++){}<br /> In a for statement, in the initialize block, you can�t declare a variable and don�t declare the other, if you make a declaration the declaration must include all the variables you refered.<br /> Eg: int i = 7, j = 0 where both i and j are declared in the same statement and have the for scope. Look that in for example i is declared outside the for and remember that you can, when declaring variables, specify the type only once: int i; int x is the same as int i, x<br /> >int j = 0;
>for (int k = 0; j + k != 10; j++, k ++){} it says is legal.
Yes, you are declaring k only in the initialize block.
For a complete detail of the for statement refer to:
JLS 2nd