Welcome to Ranch!!!
1) There are 2 methods in your example
main method
maybeNew method
2) You had to write the return statement in maybeNew() method because you had a
int written in the signature of method (after public
word you can see there's an int), but as far as the main() method block is there
you can't see the return statement because there is
void in the signature (i.e. after public word there is void)
3) Now your actual question is "where does the return value goes?" -----The return value goes to the place from where the method is called. So in your example, you have written this in your main() method
So when you wrote
the method maybeNew() is called, the method gets executed, and as per the condition written in your method, the value is returned back to the calling statement.
4) So in your case it could be either
OR
Whenever you are posting you can use code tags.