The 's' replaces 1 space match at a time however the 's+' replaces The complete Room sequence at the same time with the second parameter. Nevertheless x.replaceAll("\s+", ""); will be extra successful method of trimming Areas (if string can have various contiguous spaces) for the reason that of doubtless less https://mantra-mushroom-chocolate55533.anchor-blog.com/11668222/helping-the-others-realize-the-advantages-of-mantra-mushroom-chocolate