Here you can find the source of formatDouble(Double doubleValue)
Parameter | Description |
---|---|
doubleValue | double number to convert |
public static String formatDouble(Double doubleValue)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { /**//w w w .j av a 2 s.c o m * Converts Double to string leaving 2 decimal points * * @param doubleValue double number to convert * @return formatted string */ public static String formatDouble(Double doubleValue) { return new DecimalFormat("#,##0.00").format(doubleValue); } }