Frequency of characters

Report a typo

Write a program that reads a sequence of characters and another character, and outputs the number representing how many times this character appears in the sequence.

Try to use the standard methods to write the program.

Sample Input 1:

a a a b a
a

Sample Output 1:

4
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic