Method fizzBuzz() has String return type so you must return String after loop.
ashkan ahmadi wrote:when i compile this code, it has error "missing return statement". Can you help me?
In addition to above criteria for this method, this method has to work correctly for an empty range where start > end, and a singleton range where start == end.)
But counting backwards would go in a different method, surely. Part of the problem of that code is what I hinted at yesterday: trying to squeeze too much code into the main method.
Carey Brown wrote:. . . Do you really need to handle the case where start > end? Should this be an error? Could you swap start and end? Or would you have to count backwards?