Skip to content

Commit 1aad83d

Browse files
Mnr Average.java
1 parent 94b6789 commit 1aad83d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private Average() {
1919
* @return the average of the given numbers
2020
* @throws IllegalArgumentException if the input array is {@code null} or empty
2121
*/
22-
public static double computeAverage(double[] numbers) {
22+
public static double average(double[] numbers) {
2323
if (numbers == null || numbers.length == 0) {
2424
throw new IllegalArgumentException("Array must not be null or empty.");
2525
}
@@ -37,7 +37,7 @@ public static double computeAverage(double[] numbers) {
3737
* @return the average of the given numbers
3838
* @throws IllegalArgumentException if the input array is {@code null} or empty
3939
*/
40-
public static int computeAverage(int[] numbers) {
40+
public static int average(int[] numbers) {
4141
if (numbers == null || numbers.length == 0) {
4242
throw new IllegalArgumentException("Array must not be null or empty.");
4343
}

0 commit comments

Comments
 (0)