The String.split() method is the best way of splitting a string in Java. This method is robust, easy to use and supports regular expression (regex). Using regex, we can specify multiple delimiters inside split() method.