return back the double value with 2 decimals place in Java program <p>How can i return back the double value with 2 decimals place in Java program?</p> <pre><code>public String toString() { return "\nCost: $" +computeRentalCost() ; } </code></pre>