Last updated on October 21, 2021
Authors: Idea from Dr. Kevin Brewer. Code by Filip S. Ramazan
To run the code, compile the .java file the IDE of your choice, and then run PrimeNumber class.
This project was made with BlueJ, and if you are using another IDE, delete all the files except
the .java file.
Basically, the program will ask the user for an integer, n. The program will calculate, as fast as possible, the nth prime.
The program will intermittently give the user updates on how many primes were found. After program is done, it will write all the primes from 2 to the nth prime in a .txt file. This file will be read-only. After writing the text file, a .zip file will be compiled from the text file. The files are written in the program's path. After the first run of the program: the program will collect all the primes from the said created file, and use them to optimize performance, doing the same task as above. If more primes are calculated, then those will be written to the file too.