|
-
Aug 20th, 2003, 08:43 AM
#1
Thread Starter
Lively Member
return{Resolved}
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?
Last edited by Dilenger4; Sep 5th, 2003 at 12:37 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|