I have tried to separate 5.6 (for example) by the following method:
private static double[] method(double d) { int integerPart = 0; double fractionPart =
String doubleAsString = Double.toString(123.456);
String beforeDecimal=doubleAsString.substring(0,doubleAsString.indexOf(".")); //123
String afterDecimal=doubleAsString.substring(doubleAsString.indexOf(".")+1); //456