DecimalFormat je skvela volba pokial potrebujes s tym cislo pracoval len ako so
stringom, ak vsak potrebujes nejake dalsie matematicke operacie vyhodnejsi je
BigDecimal (http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html).
t^
> Původní zpráva
> Od: Stöh
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Jedlička
Sent: Friday, February 15, 2008 12:40 PM
To: Java konference
Subject: Desetinna cisla
Zdravim,
mam mozna zacatecnick
http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Martin Jedlička
> Sent: Friday, February 15, 2008 12:40 PM
> To: Java konference
> Subject: Desetinna cisla
>
> Zdravim,
>
>
Zdravim,
mam mozna zacatecnicky dotaz, ale zajimalo by me, jak udelam konverzi cisla
typu double (float) na dany pocet desetinnych mist.
Priklad: mam cislo - 152.2525125222558
chci cislo na 4 desetinne mista - 152.2525
Diky za radu.
Martin