Article View: borland.public.jbuilder.java.language
Article #370Re: Help with decimals precision?
From: Arthur Ore
Date: Mon, 02 May 2005 19:37
Date: Mon, 02 May 2005 19:37
19 lines
1421 bytes
1421 bytes
I think the DecimalFormat class will do what you want. http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html Arth -- Arthur Ore Sun Certified Java Programmer "Matthew" <NO@NO.com> wrote in message news:42767e3f$1@newsgroups.borland.com... >I am trying to convert a string with a value like '012300' to a decimal >value like '123.00'. I have tried coverting it into a float, but all I get >back is '123.0' and I need both zeros at the end. > > Can anyone help me? > > Matthew
Technical Details
Message-ID:
<4276818a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42767e3f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,1b050e9f3c551651 X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arthur Ore" <nospamthx@nospamthx.co.uk> Newsgroups: borland.public.jbuilder.java.language References: <42767e3f$1@newsgroups.borland.com> Subject: Re: Help with decimals precision? Date: Mon, 2 May 2005 20:37:43 +0100 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 82.69.65.131 Message-ID: <4276818a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1115062666 82.69.65.131 (2 May 2005 12:37:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail