|
-
November 22nd, 2011, 04:41 PM
#2
Re: Questions about syntax/meaning
why do they assign a null parameter here:
No idea, what does the processInput() method do.
also, why in this next one do they add the minus one. That would make it 4.
Because currentJoke is an index into the joke arrays and so it is 0 based ie with 5 jokes the index is 0-4. When you want another joke, currentJoke is incremented but when it is 4 (ie the last joke) it has to be reset to 0.
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
|