addPrime method
Adds the next prime and returns it.
Implementation
int addPrime() {
while (true) {
_n += 2;
if (internalIsPrime(_n)) {
_p.add(_n);
return _n;
}
}
}
Adds the next prime and returns it.
int addPrime() {
while (true) {
_n += 2;
if (internalIsPrime(_n)) {
_p.add(_n);
return _n;
}
}
}