The 's' replaces a single space match at any given time nevertheless the 's+' replaces the whole Place sequence simultaneously with the next parameter. Having said that x.replaceAll("\s+", ""); are going to be additional productive way of trimming spaces (if string might have a number of contiguous spaces) mainly because https://mantra-bars-euphoria-bar32974.angelinsblog.com/30724556/how-much-you-need-to-expect-you-ll-pay-for-a-good-mantra-mushroom-chocolate-bars