style: enable MethodName in CheckStyle (#5182)

enabled: MethodName in CheckStyle
This commit is contained in:
Godwill Christopher
2024-05-27 01:06:06 -06:00
committed by GitHub
parent ea4dc15a24
commit 295e7436b1
53 changed files with 225 additions and 225 deletions

View File

@ -10,7 +10,7 @@ public final class SquareRootWithBabylonianMethod {
* @param num contains elements
* @return the square root of num
*/
public static float square_Root(float num) {
public static float squareRoot(float num) {
float a = num;
float b = 1;
double e = 0.000001;

View File

@ -11,7 +11,7 @@ public final class TrinomialTriangle {
private TrinomialTriangle() {
}
public static int TrinomialValue(int n, int k) {
public static int trinomialValue(int n, int k) {
if (n == 0 && k == 0) {
return 1;
}
@ -20,17 +20,17 @@ public final class TrinomialTriangle {
return 0;
}
return (TrinomialValue(n - 1, k - 1) + TrinomialValue(n - 1, k) + TrinomialValue(n - 1, k + 1));
return (trinomialValue(n - 1, k - 1) + trinomialValue(n - 1, k) + trinomialValue(n - 1, k + 1));
}
public static void printTrinomial(int n) {
for (int i = 0; i < n; i++) {
for (int j = -i; j <= 0; j++) {
System.out.print(TrinomialValue(i, j) + " ");
System.out.print(trinomialValue(i, j) + " ");
}
for (int j = 1; j <= i; j++) {
System.out.print(TrinomialValue(i, j) + " ");
System.out.print(trinomialValue(i, j) + " ");
}
System.out.println();