Contact: aviboots(AT)netvision.net.il
43,946 questions
57,360 answers
573 users
public class MyClass { public static void main(String args[]) { String str = "Remove all spaces from string in Java"; str = str.replaceAll("\\s+",""); System.out.println(str); } } /* run: RemoveallspacesfromstringinJava */