Java Substring

A substring is a string that is part of a longer string. String class provides the following methods to get a substring from a string. 1. public String substring(int startIndex): Returns a new string that starts from a specified string and extends to the end of this string.  It will throw IndexOutOfBoundsException – if startIndex … Read more