Tue Apr 17, 2012 9:35 am
Sat May 12, 2012 10:25 pm
int FindOccurrences (String s,char mychar) {
int count = 0;
for (int i = 0; i < s.size(); i++)
if (s[i] == mychar) count++;
return count;
}
String string1="Value1";
String string2="Value2";
char x='a';
int found=0;
for(int i=0;i<string1.length();i++)
{
if(string1.charAt(i)==x){
found++;
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.