The 's' replaces one particular House match at any given time though the 's+' replaces The complete Area sequence directly with the next parameter.Nevertheless x.replaceAll("s+", ""); are going to be more effective method of trimming spaces (if string might have various contiguous Areas) mainly because of doubtless considerably less no of replaceme