Here you can find the source of getStandardDouble(double d, int pL)
Parameter | Description |
---|---|
d | a parameter |
pL | a parameter |
public static String getStandardDouble(double d, int pL)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { /**/*from w ww . j a va2 s . c o m*/ * @param d * @param pL * @return */ public static String getStandardDouble(double d, int pL) { String format = "0."; for (int i = 0; i < pL; i++) format += "0"; return ((new DecimalFormat(format)).format(d)); } }