Question: Write a java program AlphabetCount.java that prompts the user to enter a String as input and prints the occurrence of each letter in the given

Write a java program AlphabetCount.java that prompts the user to enter a String as input and prints the occurrence of each letter in the given input. We should use for loops only to solve this problem:

Input Result
Hello, I love CMPS 201
Please enter a sentence: c: 1 e: 2 h: 1 i: 1 l: 3 m: 1 o: 2 p: 1 s: 1 v: 1 
Loops are fun
Please enter a sentence: a: 1 e: 1 f: 1 l: 1 n: 1 o: 2 p: 1 r: 1 s: 1 u: 1

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!