Toggle navigation
Code Exercises
Interview Planner
Interview Guide
Practice Now
Blog
About
Easy
Moderate
Challenging
Fizz Buzz
Prime Number
Fibonacci Number
Palindrome Check
Even Fibonacci Sum
Greatest Common Divisor
Package Rice Bags
Filter Strings (Java 8 Lambdas and Streams)
Comma Separated (Java 8 Lambdas and Streams)
Ceasar Cipher
Strict Binary Tree Check
Two Sum (Pair with a Given Sum)
Prime Number
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
Write a method that checks if a number is a prime number.
public Boolean isPrime(Integer n) {
}
Submit
Clear
Solution