Here you can find the source of replaceSpaceCharacter(String string)
public static String replaceSpaceCharacter(String string)
//package com.java2s; public class Main { public static String replaceSpaceCharacter(String string) { if (null == string || "".equals(string)) { return ""; }//from ww w .j av a 2 s . c o m return string.replace(" ", ""); } }