A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
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