import java.io.*; public class test {public static input in = new input(); // input library public static void main(String[] args) throws IOException // always need main program {Double d = new Double(123.45); String s = d.toString(); System.out.println(s); int x = s.indexOf("."); if (x != -1) {String de = s.substring(x); // include decimal System.out.println(de); d = new Double(de); System.out.println(d); } } }