i'm so sorry, perhaps i should explain these so that u're not confused.

> charAt() - to get the specific character from the string, and possibly the array, and compare both to see whether it's equal or not.

what i mean in "array" here is the "array" of your character list in the form of String. i.e. String charlist="abcde...". sorry to use the word "array" there. it doesn't literally mean the word array as in charlist[].

> indexOf() - well this is just to save you from looking at redundant characters, rather than checking every characters from the *beginning* of the array of either your string or character list (you can store your character list as a string, or well, an array), you just use indexOf() to get the first occurence of the character.

again, what i mean here is that, if you store your character list in the form of array (charlist[]) you would have to fetch every single character from the beginning itself to find out which letter was it. so, rather than all that hassle, an easier way is to store the character list as a String and retrieve the first occurence of the specific character (to know which character it is).

// after u get the loc (which is of value zero, 0, // which of course, signifies that it's an A) you can // add to your counter which keeps track of how many times // the specific character occurs. // anyway, this is just a demonstration, you have to add your // own for-loop to it. g'luck ;)