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
int first = string.indexOf("is"); int second = string.indexOf("is", first + 1);
This overload starts looking for the substring from the given index.