We are given a string, say, \"itiswhatitis\" and a substring, say, \"is\". I need to find the index of \'i\' when the string \"i
\"itiswhatitis\"
\"is\"
\'i\'
\"i
Use overloaded version of indexOf(), which takes the starting index (fromIndex) as 2nd parameter:
str.indexOf("is", str.indexOf("is") + 1);