Skip to content

Commit d4ff437

Browse files
committed
fix: correct error message in surfaceAreaCylinder method
1 parent 68746f8 commit d4ff437

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
@@ -77,7 +77,7 @@ public static double surfaceAreaCylinder(final double radius, final double heigh
7777
throw new IllegalArgumentException(POSITIVE_RADIUS);
7878
}
7979
if (height <= 0) {
80-
throw new IllegalArgumentException(POSITIVE_RADIUS);
80+
throw new IllegalArgumentException(POSITIVE_HEIGHT);
8181
}
8282
return 2 * (Math.PI * radius * radius + Math.PI * radius * height);
8383
}

0 commit comments

Comments
 (0)