File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes seperate numbers from float number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "seperate numbers from float number" Watch "seperate numbers from float number" New topic
Author

seperate numbers from float number

praneeth ram
Ranch Hand

Joined: Sep 21, 2009
Posts: 60
Hi All,

I have a number var num=1.234 i want to take the numbers before and after the dot i.e 1 and 2, save it in two variables like before=1,after=2, how can i achieve this. please help me.

thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Did you look for help from the Math object?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: seperate numbers from float number
 
Similar Threads
Number Format
Help with displaying output
java decimal multiplication
How to make sure that file has been read.
help with counting occurrences of elements in an array