I think question should be occurrence of character in a String.
To do so, 1. First you have to write the logic to get the characters present in the String into the Array. 2. After knowing and having the character in the Array, iterate the String and matched the each element of Array with the every elements of the string , when it get matched then increase the counter and display the result.