Hi,
I wrote a python program that counts the occurance of each alphabetic character in a string and it works fine. I tried to port it over to java but now it fails, telling me that there is no alphabetic characters at all in it.
for (int i=0;i<alphabet.length;i++)
{
for (int q=0;i<string.length();i++)
{
if alphabet[i]==string.CharAt(q)
{
alphcount[i]++;
}
}
}
Here is the algorithm, the alphabet is stored as a char array. Alphcount is an int array that has an entry corresponding to each alphabetic character.
Any ideas?
Thanks.