Skip to content

Commit b836c44

Browse files
committed
Add JavaDoc
1 parent 7bd323e commit b836c44

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/com/codefortomorrow/advanced/chapter13/solutions/PrimePractice.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public static void main(String[] args) {
3333
}
3434
}
3535

36-
//n is the number to check, z is the current number being divided
36+
/**
37+
* isPrime checks the primality of a given integer
38+
* @param n The integer to check
39+
* @param z Current Divisor(used for recursion)
40+
* @return boolean true if prime and false if not
41+
*/
3742
public static boolean isPrime(int n, int z) {
3843
//Check base cases
3944
if (n <= 2) return (n == 2) ? true : false;

0 commit comments

Comments
 (0)