KnowledgeBoat Logo
|

Computer Applications

State the purpose and return data type of indexOf() function.

Java String Handling

ICSE 2010

35 Likes

Answer

It returns the index within the string of the first occurrence of the specified character or -1 if the character is not present. Its return type is int.

Answered By

25 Likes


Related Questions