I got an Java question during my interview as below
public static boolean isSame(Integer a, Integer b){
return a==b;
}
public static void main(String[] arg){
int i=0;
for(int j=0;i<500;++i,++j){
if(isSame(i,j)){
continue;
}
else break;
}
}
The question is "i=?" at last.
I thought i would be 500 at last. But when I tried it in Eclipse i=128!
So I was wondering what is happening here.
Thanks