Return to Snippet

Revision: 35835
at November 14, 2010 08:36 by mouseroot


Initial Code
import java.text.*;

DecimalFormat fmt = new DecimalFormat("$0.00");

double test = 1337.09879475398758784;
System.out.println("Fixed Double: " + fmt.format(test));

Initial URL


Initial Description
Use this small snippet to change doubles from 123.1234567890 to whatever you wish

Initial Title
Decimalformat to format decimal points

Initial Tags


Initial Language
Java