Home > Java > javaTutorial > What does split mean in Java?

What does split mean in Java?

藏色散人
Release: 2020-09-17 15:51:02
Original
13521 people have browsed it

What does split mean in Java?

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)
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template