
-----------------------------------
Johnny19931993
Sun Nov 15, 2009 8:16 pm

A question on &quot;for&quot; loop
-----------------------------------
I'm new to java and I've encountered a problem when I was using the for loop
Apparently I can't assign a variable to it as the initial value 
like this

int a = 100;
for (int i = a; i == 101; i++)
{
Statement;
}

For example, if the statement was to output some string, it doesn't do it
can someone help me?
(I am using dr.java)

-----------------------------------
Insectoid
Sun Nov 15, 2009 9:09 pm

RE:A question on &quot;for&quot; loop
-----------------------------------
This for loop will only execute while i == 101. So it will check, does i = 101? No? Okay, skip this part! 

Try for (int i = a; i 