The indexOf(String str, int fromIndex) method is utilized to return the index of the sub-string which occurs first from the index we specify in the string stated.
Method Definition: int indexOf(String str, int fromIndex)
Return Type: It returns the index of the sub-string from the index specified in the argument.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.