mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
style: enable MethodName
in CheckStyle (#5182)
enabled: MethodName in CheckStyle
This commit is contained in:

committed by
GitHub

parent
ea4dc15a24
commit
295e7436b1
@ -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;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user