Prime Directive Project Thrown Error?

Please review my project and tell me where I do wrong , I try to solve error but i can’t.

In the onlyPrimes function, you forgot to add the number to the arrayList if isPrime is true.

You can write an if-statement inside the loop to add a number to the primes ArrayList only if the number is prime.

    for (int prime : number) {
      if(isPrime(number)) {
        primes.add(number);
      }
    }

Thank you so much for this.