mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
fix: correct error message in surfaceAreaCylinder method (#7106)
This commit is contained in:
committed by
GitHub
parent
f693c44b53
commit
1c6026ecc6
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user