Read a word and a character, and count how many times that character appears in the word.
Input / Output
Input: line 1 is a word, line 2 is a single character. Output: the number of occurrences.
Examples
Input
banana a
Expected Output
3
Input
mississippi s
Expected Output
4
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.