Ya, you have to create a DecimalFormat, and then set it with 2 decimal
places, and then create a string, with the double as the parameter, where
the string will be the 'parsed' double.

S


----- Original Message -----
From: "Josh G" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 10:53 PM
Subject: Java q: round to n decimal points?


> Is there a nice easy way to round a double to n decimal points? I couldn't
> see anything in Math,Double,String, or NumberFormat...
>
> -Josh
> --
> And can you tell me doctor why I still can't get to sleep?
> And why the channel 7 chopper chills me to my feet?
> And what's this rash that comes and goes, can you tell me what it means?
> God help me, I was only 19
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to