String string = "Java Java";
// First occurrence of a character ‘a’
int index = string.indexOf('a'); // 1
// First occurrence of a sting “dam”
index = string.indexOf("ava"); // 1
Tuesday, June 23, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment