






(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





















Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.
Popular searches:
Join 2 million readers and get unlimited free ebooks