Check out example codes for "how to find substring in java". It will help you in understanding the concepts better.

Code Example 1

int indexOf(char c)
// Accepts character as argument, Returns index of 
// the first occurrence of specified character

Learn ReactJs, React Native from akashmittal.com