Remove whitespaces between two or more words

I need to remove whitespaces between two or more words in a string.

Ex: Lets consider a string like this “Have a good day”. Here I need to remove whitespaces between the words.

Input: Have a good day

Output: Haveagoodday

Please suggest me a solution for this. Thanks in advance.

@VGopalakrishnan

You could use below mentioned function to remove empty spaces between input string value…

Function Name = stripNonAlphaNumericChars

@VGopalakrishnan I will suggest to use replaceAll function to remove whitespace.