Hello, everyone.

I have an issue with the project. I follow every step of the project to build my code but it returns a “prime” number when it should not.

**This is the input:**

int numbers = {6, 29, 28, 33, 11, 100, 101, 43, 89};

**This is the output:**

[6, 33, 11, 101, 43, 89]

**The number 33 is not a prime number.**

Please, anybody could help me with this:

// Import statement:

import java.util.ArrayList;

class PrimeDirective {

// Add your methods here:

public static boolean isPrime(int number){

if(number == 2){

return true;

} else if(number < 2){

return false;

}

```
for(int i = 2; 2 < number; i++){
if((number % i) != 0 ){
return true;
} else{
return false;
}
}
return false;
```

}

public ArrayList onlyPrimes(int numbers){

ArrayList primes = new ArrayList();

```
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.isPrime(33));
System.out.println(pd.onlyPrimes(numbers));
```

}

}

Thank you!