Java: double: how to ALWAYS show two decimal digits <p>I use double values in my project and i would like to always show the first two decimal digits, even if them are zeros. I use this function for rounding and if the value I print is 3.47233322 it (correctly) prints 3.47. But when i print, for example, the value 2 it prints 2.0 .</p> <pre><code>public static double round(double d) { BigDecimal bd = new BigDecimal(d); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } </code></pre> <p>I want to print 2.00! </p> <p>Is there a way to do this without using Strings? </p> <p>Thanks!</p> <p>EDIT: from your answers (wich I thank you for) I understand that I wasn't clear in telling what I am searching (and I'm sorry for this): I know how to print two digits after the number using the solutions you proposed... what i want is to store in the double value directly the two digits! So that when I do something like this <code>System.out.println("" + d)</code> (where d is my double with value 2) it prints 2.00. </p> <p>I'm starting to think that there is no way to do this... right? Thank you again anyway for your answers, please let me know if you know a solution!</p>