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.