Skip to content

Commit 14b9057

Browse files
committed
style: fix formatting
1 parent 2846836 commit 14b9057

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/com/thealgorithms/maths/Average.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ public final class Average {
1616

1717
// Prevent instantiation of this utility class
1818
private Average() {
19-
throw new UnsupportedOperationException(
20-
"This is a utility class and cannot be instantiated.");
19+
throw new UnsupportedOperationException("This is a utility class and cannot be instantiated.");
2120
}
2221

2322
/**
@@ -32,8 +31,7 @@ private Average() {
3231
*/
3332
public static double average(double[] numbers) {
3433
if (numbers == null || numbers.length == 0) {
35-
throw new IllegalArgumentException(
36-
"Numbers array cannot be empty or null");
34+
throw new IllegalArgumentException("Numbers array cannot be empty or null");
3735
}
3836
double sum = 0;
3937
for (double number : numbers) {
@@ -54,8 +52,7 @@ public static double average(double[] numbers) {
5452
*/
5553
public static long average(int[] numbers) {
5654
if (numbers == null || numbers.length == 0) {
57-
throw new IllegalArgumentException(
58-
"Numbers array cannot be empty or null");
55+
throw new IllegalArgumentException("Numbers array cannot be empty or null");
5956
}
6057
long sum = 0;
6158
for (int number : numbers) {

0 commit comments

Comments
 (0)