Helping The others Realize The Advantages Of mantra mushroom chocolate
The 's' replaces one particular Place match at a time however the 's+' replaces The entire Area sequence at the same time with the second parameter.On the other hand x.replaceAll("s+", ""); will be much more productive means of trimming spaces (if string can have multiple contiguous spaces) simply because of potentially much less no of replacements