Split a String in Java
Java String class has the method split() to split a string around matches of a given regular expression. java.lang.String: public String[] split(String regex) Parameters: regex – the delimiting regular expression Returns: the array of strings computed by splitting this string …