A substring of a string is defined as a sequence of characters in the string starting at some index and going continuously (without skipping any index or changing the order of characters) up to some higher index. The right index of the substring must be greater than or equal to the left index.
Java String substring() is an inbuilt method that returns the substring of the string starting from a specified index and going till the end of the string or up to a specified end index(excluding that index).
#java #substring