wap to accept a number and check whether if it is a prime number or not in java
Answers
Answered by
1
Explanation:
The isPrime(int n) method is used to check whether the parameter passed to it is a prime number or not. If the parameter passed is prime, then it returns True otherwise it returns False. If the number is less than 1, if(inputNumber<= 1) it returns false.
Similar questions