Thursday, July 21, 2011

Can someone look at this Java code? 10 points for best answer.?

You need to have a default return value, in case none of your conditions are true. The easiest (although, it might be buggy) way to fix this is to delete the last "if" statement....So the last line just says "return 0;". That will get rid of your error, although it might not work as you might expect.

No comments:

Post a Comment