Question: 2. [60 points) Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user
2. [60 points) Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user to enter a string and displays the number of uppercase letters in the string. Note that writing a non-recursive method will lead to a zero mark. Hint: you can use Character.isUpperCase() method to check whether a character is uppercase or not. The following example shows what the user will see on the screen: This program calculates the number of uppercase letters in a string. Enter a string: Hello World! The number of uppercase letters:2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
