There is *no* such a thing as a format in a double. A double is just a value -- it doesn't hold the concept of notation. What is happening is that the double is formatted when it is printed. So, you can use printf() instead, which allows you to format the double (during printing). Or you can use the DecimalFormat class, which will format it back to a string so you can print it.