File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Urgent  A method in Java  which rounds 18 places to 8 places after decimal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Urgent  A method in Java  which rounds 18 places to 8 places after decimal " Watch "Urgent  A method in Java  which rounds 18 places to 8 places after decimal " New topic
Author

Urgent A method in Java which rounds 18 places to 8 places after decimal

Vamsi Chada
Greenhorn

Joined: Aug 12, 2004
Posts: 10
Hai
Plz help me
I want to round a decimal number with 18 places of decimal to 8 places of decimal.

Thank you for this
regards
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Read the Api for the class java.text.NumberFormat
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Please don't CROSSPOST. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.

Also, as mentioned in your post in the other forum, don't flag your question as urgent, even if it is for you. Claiming urgency is very likely to be counter-productive: most forum regulars will simply ignore such messages as rude and selfish attempts to elicit immediate and special attention.

Besides, unless a legion of ninja lemmings is about to chase you over the edge of a cliff, your problem probably isn't as urgent as you think.

Thanks!
[ June 21, 2005: Message edited by: Steve Morrow ]
Vamsi Chada
Greenhorn

Joined: Aug 12, 2004
Posts: 10
Iam taking a String from a file which is actually 15 decimals long and the Decmal format is rounding that in scientific notation whereas i want the number in decimal notation . Plz help me over this
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent A method in Java which rounds 18 places to 8 places after decimal