How to search for substring from a string in JAVA ?
Hi, For searching for a particular substring from a starting index of a string and get the starting index of it in JAVA, use the following sample of code. It will print out the starting index of the substring ‘co’ (the second ‘co’), that is 6. 🙂