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 number formating Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "number formating" Watch "number formating" New topic
Author

number formating

Benjamin Samuel
Ranch Hand

Joined: Dec 15, 2006
Posts: 33
I'm having a double value
e.g. a)99558669546.
b)0.00125

I have to convert these values into String. I need to read the value as-is without any truncation or formatting. For E.g. i do not want 'a'
to be formatted in Exponential format (like E9) and i dont want 'b' to be truncated to 0.001 while converting to String.

How can I achieve this using NumberFormat class or is there any other class through which this can be achieved?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Please do not post the same question to multiple forums. Read this for why I deleted the other copies of your post.


Android appsImageJ pluginsJava web charts
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
You didn't give us an example of how you want to use this as a string.

Try the docs for System.out.printf().


Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: number formating
 
Similar Threads
Why String class is immutable
Clean way of checking if object type is primitive or String
key/values to hashmap
object name to string variable
Copy value from attribute a1 in class A.java to attribute b1 in class B.java using 0bject mapping