public class A { public static void main(String[] args) { String str = "1..2...3.4......5..6"; str = str.replace(".", ""); System.out.println(str); }}