Question: Write a program that reads a string and counts the occurrences of each letter. The letters are case - insensitive. The program displays the letters

Write a program that reads a string and counts the occurrences of each letter. The letters are case-insensitive. The program displays the letters and their corresponding count in increasing order of the count. If the two counts are equal, use the alphabetic order. The letters are displayed in lowercase.
Sample Run
Enter a string: Welcome to Java
c: 1
j: 1
l: 1
m: 1
t: 1
v: 1
w: 1
a: 2
e: 2
o: 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 Programming Questions!