Java String split() is an inbuilt method introduced in JDK 1.4 which splits the String wherever it encounters a given regex and returns the split up parts in the form of an array. The string split() method breaks a given string around matches of the given regular expression. In this example, you will learn how to split the string in Java. Also, if you want to convert java string to array, then Java string split() example is useful.

Java String split()

While programming, we may need to break the string based on some attributes. Mostly this attribute will be a separator or a common – with which you want to break or split the string.

#java #java string split

Java String split() Function Example
2.65 GEEK