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
Re: Roundup Problem
Joined: Oct 18, 2002
Apr 25, 2005 22:59:00
I have 2 double values, 2.44 and 2.45 that I want to make a roundup with them such that it can produre "2.4" and "2.5" respectively. Does any
API provide methods for this?
Joined: Aug 07, 2003
Apr 25, 2005 23:35:00
has a method you can use, but you'll need to do some trickery to get it to round to different precisions (one decimal place in you case). Give it a try and post again if you can't figure out a way to work it.
Joined: Mar 09, 2005
Apr 26, 2005 00:06:00
i think u have round()in java.lang.math class to solve it.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Re: Roundup Problem
Links not working & Rules Roundup game
Rule Round-Up question 68
Javaranch's Java Roundup Game
Can I get all the questions from the mock exam
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015