The meaning of split() in Java: Split a string into substrings, and then return the result as a string array.
split() methodSplits a string based on matching the given regular expression.
Note:
., | and * and other escape characters must be added with \\.
Multiple separators, you can use | as a hyphen.
Syntax
public String[] split(String regex, int limit)
Parameters
regex -- Regular expression delimiter.
limit -- The number of divided copies.
Return value
String array.
Related learning recommendations: java basic tutorial
The above is the detailed content of What does split mean in Java?. For more information, please follow other related articles on the PHP Chinese website!