the ans lies in the way variables are declared ,
when we have to declare a more than one int varible we do it this way
int i , j ;
until the compiler sees a ';' , it expect only a identifier-name after a comma
for(int i = 0, System.out.println("run"); flag; i++) {
//loopbody
} in this code , wht is happening is sort of ;
int i = 0, System.out.println("run");
this isnt okay wid compiler , becoz it expects , second variable name after comma(,) .And compiler can expect any other statement only after a semi-colon( ; ) , but a semi-colon in this case will effectively mark end of intialization part of for !!
for more things on statements within for-loop-expressions , check my another post in this forum at ;
http://www.javaranch.com/ubb/Forum24/HTML/011538.html ------------------
Gagan (/^_^\)
[This message has been edited by Gagan Indus (edited August 16, 2001).]