how to remove one extra space in last of a string code example Example: java remove double spaces StringUtils.normalizeSpace(string);