public int indexOf(int ch, int fromIndex) *if the fromIndex is greater than the length of the string wats the effect.... *if the fromIndex is equal to the length of the string wats the effect.... *if the fromIndex is negative wats the effect....
There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.