Skip to content

Commit 1c6026e

Browse files
authored
fix: correct error message in surfaceAreaCylinder method (#7106)
1 parent f693c44 commit 1c6026e

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/thealgorithms/maths

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static double surfaceAreaCylinder(final double radius, final double heigh
9696
throw new IllegalArgumentException(POSITIVE_RADIUS);
9797
}
9898
if (height <= 0) {
99-
throw new IllegalArgumentException(POSITIVE_RADIUS);
99+
throw new IllegalArgumentException(POSITIVE_HEIGHT);
100100
}
101101
return 2 * (Math.PI * radius * radius + Math.PI * radius * height);
102102
}

0 commit comments

Comments
 (0)