Write a recursive method thatfinds the number of occurrences of a specified letter in a string using the followingmethod header:
public static int count(String str, char a)
For example, count("Welcome", 'e') returns 2. Write a test program thatprompts the user to enter a string and a character, and displays the number ofoccurrences for the character in the string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here