I think you can convert the native data type double to
a Java object Double (there is a constructor for that)
and apply different formats or truncation methods. You
can search in the API for Double class reference and
methods.
http://java.sun.com/j2se/1.4.2/docs/api/