Prime Directive Java Help

I made it all the way through the project with no problem until it came down to ridding the array of non-prime numbers. The code still prints all of the original numbers. Any hints to where I went wrong?

// Import statement:
import java.util.ArrayList;

class PrimeDirective {
  // Add your methods here:
  public boolean isPrime(int number) {
    if (number == 2) {
      return true;
    } else if (number < 2) {
      return false;
    }
    for (int i = 2; i < number; i++) {
      if (number % i == 0) {
        return false;
      } 
    }
    return true;
  }
  
  public ArrayList<Integer> onlyPrimes(int[] numbers) {
    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.onlyPrimes(numbers));
  }  
}

If you print out the steps you’re carrying out rather than just looking at the final result, then you can narrow it down a whole lot.
Find out which particular operation isn’t doing what you meant. You can print things out anywhere at any time.

Looks like you have a syntactic error inside your onlyPrimes() method. There is a semicolon at the start of the nested if-loop that needs to be removed (just before the initial curly brace). Try that and see if the code does what you want it to do. These types of errors can be infuriating because the rest of the code looks great. Happy coding!