Not really. This still has the problem that double and float are not precise; see item 20 in our Beginner's FAQ. The only data type in the Java API that can solve this issue is BigDecimal. Never instantiate one from a double though, use the String constructor instead:
If the format is only relevant when displaying the data, use DecimalFormat to get a formatted String representation of the double. The double value is just a number - it doesn't have a strict 'format' as such. As an example, 1.000000 and 1.0 are the exact same number.
If precision is important, use a BigDecimal instead of a double.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw