hi i know this is a newb question, but how do i get doubles to display the end zeros after the decimal point for example i want to display 1.20 but i'm getting 1.2
cheers
hi i know this is a newb question, but how do i get doubles to display the end zeros after the decimal point for example i want to display 1.20 but i'm getting 1.2
cheers
Jump to PostTry NumberFormat and its derivatives.
Check the API docs for specifics.
Try NumberFormat and its derivatives.
Check the API docs for specifics.
More examples...
http://java.brangle.com/tutorials/java/text/DecimalFormat.php
import java.text.DecimalFormat;
DecimalFormat df = new DecimalFormat("###.00");
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.