I have a string like this:
My = "name=avi age=12 year=2000";
I want to remove the whitespaces in the string. I tried to trim()but this removes only whitespaces before and after the whole string. I also tried replaceAll("\\W", "") but then the = also gets removed.
How can I achieve a string with:
my = "name=aman=12year=2000"