java program to remove multiple spaces in a string within a string code example Example: java remove double spaces StringUtils.normalizeSpace(string);