Question: write a java program that counts the frequency of letters in a written statement text and give as output the number of letters, the number
write a java program that counts the frequency of letters in a written statement

text and give as output the number of letters, the number of string tokens, and a table giving the frequency of each letter. For example, Enter a single line of text: Now is the time for all good men to come to the aid of their country The line contains 53 letters. The line contains 16 string tokens The frequency of letters is A2 c -2 H 3 L--2 M3 N3 0 R3 T--7 U--1 W-1 Y-1 The table of letter frequencies must use capital letters (as above), but can be in more than one column. Use an array to store the letter frequencies. Name the program ScanningText.java. Hint: Read the line of text into a string variable using the nextLine method, string 1inei line = input.nextLine(); and later use int ch, counti for (ch achz cht+) -Count the number of occurrences of ch in the line -Print the count if0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
