Here you can find the source of truncateNoSciNotation(double d, int decimals)
public static String truncateNoSciNotation(double d, int decimals)
//package com.java2s; //License from project: Open Source License public class Main { public static String truncateNoSciNotation(double d, int decimals) { return String.format("%." + decimals + "f", d); }//from ww w . j av a 2 s . c om }