Anonymous
public java v1 · immutablepublic class PrimeGenerator{ private int tes1 = 3; private int tes2 = 2; private int tes3 = 0; public PrimeGenerator() { } public int nextPrime() { while(tes2 <= tes1) { if((tes1 % tes2) != 0) { tes2++; } else { return tes3; } } tes2 = 2; tes1++; return (tes1 - 1); }}