Java tutorial
import java.math.BigDecimal; public class Main { public static void main(String[] args) { Double d = new Double("123.45678"); BigDecimal bg = BigDecimal.valueOf(d); System.out.println(bg); } }