Please enable JavaScript to use CodeHS

CodeHS Glossary


int indexOf(String str) Java

Returns the index of the first occurrence of str; returns -1 if not found