When using Eclipse Luna I run into this issue: When I declare a variable outside of the for
loop (or another structure), then initialize it within the For loop, upon closing the for
loop the value assigned to the variable within the for
loop is not carried over.
Perhaps this is how it's supposed to be, but when using Eclipse Juno I don't have this problem.
int sebastian;
for(int i=0;i<8;i++)
{
sebastian = 5*i;
System.out.println(sebastian);
}