Helping The others Realize The Advantages Of mantra mushroom chocolate
The 's' replaces 1 Area match at a time however the 's+' replaces The entire space sequence at the same time with the second parameter.Having said that x.replaceAll("s+", ""); will be much more effective means of trimming spaces (if string might have various contiguous Areas) mainly because of probably a lot less no of replacements because of the t