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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!