File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Extracting values from a double Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Extracting values from a double " Watch "Extracting values from a double " New topic
Author

Extracting values from a double

Sri Ram
Greenhorn

Joined: Feb 13, 2006
Posts: 20
I have a double number d = 15.33 .I want to do the below calculation.(ie) i want to seperate the whole number and the decimal part without using a splitter based on (.) to gets the values.How can I do that??

e.g. 15.33 convert to 1520

Take decimal portion * 60 rounded. (0.33*60=20)

is what i want to perform? Please help.


Sriram<br />SCJP<br />SCWCD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Extracting values from a double
 
Similar Threads
method to find # of digits after decimal
fixed length decimal numbers
Double Value
rounding off in java
Extracting values from a double