fix: correct error message in surfaceAreaCylinder method (#7106)

This commit is contained in:
Eswar Venkata Ram Charan Seeram
2025-11-25 01:46:16 +05:30
committed by GitHub
parent f693c44b53
commit 1c6026ecc6

View File

@@ -96,7 +96,7 @@ public final class Area {
throw new IllegalArgumentException(POSITIVE_RADIUS);
}
if (height <= 0) {
throw new IllegalArgumentException(POSITIVE_RADIUS);
throw new IllegalArgumentException(POSITIVE_HEIGHT);
}
return 2 * (Math.PI * radius * radius + Math.PI * radius * height);
}