String split()

This method returns an array of string by splitting the given string into multiple words based on the specified delimiter or regular expression. Sometime, in our application we may need to divide or split the string based on some special characters like “|” or empty space and in all such cases we can use split() […]

Share this article on

Substring()

Let us understand Substring() method This method returns a new string which is a part of the given string. It begins with a character at the specified index and extends to either end of string or specified end index. There are 2 overloaded methods of substring public String substring(int startIndex) public String substring(int startIndex, int […]

Share this article on
< Previous Next >