






(xi). indexOf();


FORMAT: a1.indexOf(‘d’);

USAGE:

This returns the position of the first occurrence of ‘d’ in the string a1.

(xii). indexOf(); [another format]

FORMAT: a1.indexOf(‘d’,n);

USAGE:



This format gives the position of ‘d’ starting from the nth position in the

string variable a1.


(xiii). compareTo()


FORMAT: a1.compareTo(a2);


USAGE:


This function returns negative if a1 is less than a2, positive if a1 is greater than a2 and zero if a1 is equal to a2.






attention@computerscienceexpertise.com




















