java remove repeating spaces code example Example: java remove double spaces StringUtils.normalizeSpace(string);