Simple Java application that searches for prime numbers