Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { private static double getdPoint(double num) { double d = num; int fInt = (int) d; BigDecimal b1 = new BigDecimal(Double.toString(d)); BigDecimal b2 = new BigDecimal(Integer.toString(fInt)); double dPoint = b1.subtract(b2).floatValue(); return dPoint; } }