Maybe. You need something that can hold multiple values. An array is one implementation option. There are others.
Personally, I only introduce prime numbers into source when I need prime numbers.
How many primes have you hard coded so far? Doing all of them will take a fair while.