File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
seperate numbers from float number
Joined: Sep 21, 2009
Nov 19, 2012 19:41:50
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.
Author and ninkuma
Joined: Jan 10, 2002
Nov 19, 2012 20:35:12
Did you look for help from the Math object?
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: seperate numbers from float number
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014