Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA
/ isPrime
Method
isPrime
32. Java Programs/fibonacci_twist.java:30–40 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
28
}
29
30
private
static
boolean isPrime(
int
n) {
31
if
(n == 1) {
32
return
false;
33
}
34
for
(
int
i = 2; i * i <= n; i++) {
35
if
(n % i == 0) {
36
return
false;
37
}
38
}
39
return
true;
40
}
41
}
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected