Science, asked by yashpal6497, 1 year ago

How to Split String in java?

Answers

Answered by sweetandsimple64
1
Java – String split() Method example. The method split() is used for splitting a String into its substrings based on the given delimiter/regular expression. ... String[] split(String regex) : It returns an array of strings after splitting an input String based on the delimiting regular expression.

I hope you like this answer
Answered by Oreki
10

We can split a String based on separator/delimiter/regex by using .split(String regex) method of String class.

Similar questions