Hey everyone, I keep getting a missing return statement } error on line 21. I’m stumped.

Ive checked all my curly brackets. there’s something I’m missing

Any advice at all would be great

```
PrimeDirective.java:21: error: missing return statement
} //missing return statement!!!
^
1 error
```

```
// Import statement:
import java.util.ArrayList;
class PrimeDirective {
// Add your methods here:
public boolean isPrime(int number){
if (number == 2) {
return false;
} else if (number < 2) {
return true;
}
for (int i = 2;i < number; i++){
if (number % i == 0){
return false;
} else {
return true;
}
}
} //missing return statement!!!
public ArrayList<Integer> onlyPrimes(int[] numbers) {
// method body goes here
ArrayList<Integer> primes = new ArrayList<Integer>();
for (int number : numbers){
if (isPrime(number)){
primes.add(number);
}
}
return primes;
}
public static void main(String[] args) {
PrimeDirective pd = new PrimeDirective();
int[] numbers = {6, 29, 28, 33, 11, 100, 101, 43, 89};
System.out.println(pd.isPrime(7));
System.out.println(pd.isPrime(28));
System.out.println(pd.isPrime(2));
System.out.println(pd.isPrime(0));
System.out.println(pd.onlyPrimes(numbers));
}
}
```