Class name: PrimeFinder
Method name: getPrime
Parameters: int
Returns: int
Implement a class PrimeFinder that contains the method getPrime. getPrime
takes an integer x as a parameter and returns the smallest prime number greater
than x.
*For this problem, a prime number is defined as any nonnegative integer with
only two unique nonnegative divisors: itself and 1.
The method of the signature is:
public int getPrime (int x);
*x must satisfy 0 <= x <= 1000000.
Examples:
-If x=6, then the method should return 7.
-If x=13, then the method should return 17.
|