style: enable ParameterName in CheckStyle. (#5196)

* Enabled: ParameterName in CheckStyle.

* Refactored to fix  bug caused by selfAssignment of variables in VectorCrossproduct class
This commit is contained in:
Godwill Christopher
2024-05-31 14:01:11 -06:00
committed by GitHub
parent 2568b96784
commit c42b1c940c
23 changed files with 139 additions and 139 deletions

View File

@ -12,7 +12,7 @@ public final class NewManShanksPrime {
private NewManShanksPrime() {
}
public static boolean nthManShanksPrime(int n, int expected_answer) {
public static boolean nthManShanksPrime(int n, int expectedAnswer) {
int[] a = new int[n + 1];
// array of n+1 size is initialized
a[0] = 1;
@ -22,7 +22,7 @@ public final class NewManShanksPrime {
a[i] = 2 * a[i - 1] + a[i - 2];
}
// The loop is continued till n
return a[n] == expected_answer;
return a[n] == expectedAnswer;
// returns true if calculated answer matches with expected answer
}
}