Note: Version 2, below, uses the Sieve of Eratosthenes. There are several answers that helped with what I originally asked. I have chosen the Sieve of Era
The easiest solution would be to return some member of the Collections Framework instead of an array.