Scenario
Implementing the sieve of Eratosthenes algorithm to find all prime numbers up to a given limit.
Aim
To develop a code in Java for implementing the sieve of Eratosthenes.
Prerequisites
- Implement the isPrime() method of the SieveOfEratosthenes class that should return true if the number is prime, and false otherwise. It is available at the following URL:
https://github.com/TrainingByPackt/Data-Structures-and-Algorithms-in-Java/blob/master/src/main/java/com/packt/datastructuresandalg/lesson7/activity/sieve/SieveOfEratosthenes.java - Consider building the sieve in the class constructor