Question: Stuck on a particular part of my assignment: having a return statement outside of a loop. If you look at the code, you can kind of guesstimate what I'm trying to do here. The rest of the program works, but this method keeps giving me the same error statement: "missing return statement".

```
private static String HighOrLow (int[] numbers)
 {
     for (int i = 0; i < numbers.length; i++)
     {

        if (numbers[i] > average) {
             return (numbers[i] + "is above the average");
        }
        else if (numbers[i] < average) {
             return (numbers[i] + " is below the average");
        }
        else   {
             return (numbers[i] + " is equal to the average");
        }

    }

```

I realize something's supposed to go outside the forloop, but not sure how to go about it. Any helpful help is appreciated.

4/5/16: First of all, thanks for all the help! I got it set and ready to go..except every number, high or low, is pulling into above average. Paul Guiheen has the right idea and I appreciate it, but I have to print separate line for each array integer.

Answer: 
You should add a return statement outside the loop in case numbers length is 0, so it will never enter inside your for function. 

```
private static String HighOrLow (int[] numbers){
 for (int i = 0; i < numbers.length; i++) {
    if (numbers[i] > average) {
         return (numbers[i] + "is above the average");
    }
    else if (numbers[i] < average) {
         return (numbers[i] + " is below the average");
    }
    else   {
         return (numbers[i] + " is equal to the average");
   }
  }
  return "No numbers founds";
}

```

Also by convention methods should start with the first letter lowercase:

> 
> Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.
> 
> 
>
If you wanted to evaluate all the numbers you should store the result for each integer in the array, let the loop finish and then return.

```
    private static String HighOrLow(int[] numbers) {
        if (numbers.length == 0) {
            return "No numbers provided";
        }

        ArrayList<Integer> above = new ArrayList();
        ArrayList<Integer> equal = new ArrayList();
        ArrayList<Integer> below = new ArrayList();

        for (int i = 0; i < numbers.length; i++) {
            if (numbers[i] > average) {
                above.add(numbers[i]);
            } else if (numbers[i] < average) {
                below.add(numbers[i]);
            } else {
                equal.add(numbers[i]);
            }
        }

        StringBuilder result = new StringBuilder();
        result.append("Above Average: ");
        result.append(above.toString());
        result.append(", ");
        result.append("Below Average: ");
        result.append(below.toString());
        result.append(", ");
        result.append("Average: ");
        result.append(equal.toString());
        return result.toString();
    }

```