public int woo(int a){
int y = 78;
for(int i=0; i<100; i+10){ //i+10 is invalid
if (i == a)
return y;
}
return a;
}
I want the method to return 'y' if 'a' == 'i'.
if i == a, will the for loop be stopped (no further loops) and y be returned (ending the method)?
therefore, if i != a, a will be returned?
by the way, how do i get the increment of i to be +10 in every pass?


Reply With Quote