int j = 123456; String x = Integer.toString(j); x = x.substring(0, 4) + "." + x.substring(4, x.length); //output : 1234.56