Re: Rounding off a float to two decimal places

From: Margaret (Rita_Shpilsky_at_hvbamericas.com)
Date: 10/09/03


Date: 9 Oct 2003 10:42:56 -0700

DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" );
double dd = 100.2397;
double dd2dec = new Double(df2.format(dd)).doubleValue();

The value of dd2dec will be 100.24

"Joe M Blow" <joemblow@rogers.com> wrote in message news:<rI%gb.261229$Lnr1.5787@news01.bloor.is.net.cable.rogers.com>...
> Hi evreyone
>
> I just want to kno how to make my value (a float) and round it off to two
> decimal places
>
>
> Thanks alot
>
> Ty