ICSE Class 10 Computer Applications
Question 40 of 46
String Handling — Question 4
Back to all questions 4
Question Question 4
The indexOf() method returns the position of the ............... .
- first occurrence of the specified character
- last occurrence of the specified character
- null character
- '\n' character
first occurrence of the specified character
Reason — The indexOf() method returns the index (position) of the first occurrence of the specified character in a string.