Harry Peters wrote: Here is what I did, and BlueJ says I'm missing a return statement.
Well, first, I agree the code doesn't make much sense... but... in terms of the compile error, with Java, when you declare that a method returns a type, it *must* return that a value of that type. And this is true for all possible code paths.
In your code, it is possible for either loop's condition to never be true (as detected at compile time), and hence, the code would end up after the two loops -- and in a section of code, that does not have a return statement. Or in other words, the compiler is complaining that it is possible for the method to execute in a way that doesn't encounter a return statement.
Henry