This the third post for Java string methods. In this post I will detail more functions and its functionalities.
split()
This method has two variants and splits this string around matches of the given regular expression.
Syntax:
public String[] split(String regex, int limit)
or
public String[] split(String regex)
- regex — the delimiting regular expression.
- limit — the result threshold which means how many strings to be returned.
- It returns the array of strings computed by splitting this string around matches of the given regular expression.
Leave a Reply