If you create a BigDecimal object from your double value, then you can set the scale (2) and choose your rounding method (looks like you want ROUND_DOWN or ROUND_FLOOR). After that, you can return to a type double if you like. This might be all you need, but suppose the result is 49.9 and you want to display a zero in that second decimal place. This is where DecimalFormat comes in...
NOTE: When you make your BigDecimal object, you'll probably want to use the constructor that takes a
String argument rather than a double. See API.
Ref:
http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html [ September 24, 2004: Message edited by: marc weber ]