Monday, August 15, 2011

Java Program Odd or Even using Methods?

I'm no Java expert, but I'm pretty sure your use of the keyword "return" is inappropriate in this context. You cannot use it to refer to the value that was just returned by the function/method on the previous line - instead you should have used a variable to store the value returned by odd_Even().

No comments:

Post a Comment