String.format("%.1f", hypotenuse);
Ahhh, so easy. I can't believe I didn't think of that. Thank you, as always.
Type: Posts; User: bdennin
String.format("%.1f", hypotenuse);
Ahhh, so easy. I can't believe I didn't think of that. Thank you, as always.
I want round to round to the nearest 10th instead of the nearest integer... Any ideas?
public class Triangle
{
private final int leg;
private final double hypotenuse;
...