DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Java
Reload this Page Currency Format in java
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: May 2008
Default Currency Format in java - 06-04-2008, 08:20 AM

Hi,

How can i able to format a given value without rounding for (20,2) digits
i.e., 20 is integer part and 2 is decimal part

Ex: if i give as 12345678901234567890.25
it should display as :- 12,345,678,901,234,567,890.25

can anybody help me in this regard

Thanks
latha
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Apr 2008
Location: Sydney
Default 06-06-2008, 02:58 AM

Use the DecimalFormat class.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering the currency format depending upon currencies selected in dropdown box srinivasrao27 Ajax & Javascript 1 09-25-2008 01:22 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com