Computer Science, asked by Sayeezh7256, 1 year ago

wap in java to accept a sentence and find the frequency of a given letter

Answers

Answered by shoabnoori786
0

In response to one of our readers, we have written this Java Program to find the Frequency of a given Letter in Text. You can read Java Program to Count Frequency of Words in given Text here.

In this program we are taking a String input for Text and another String input for Letter to be searched. After that we are using a for loop to search for the frequency of a given Letter in the Text string. If the Letter is found, then we are incrementing the count variable else we are continuing the iteration. After the iteration is complete we are printing the Frequency of given letter using thecount variable.

Attachments:
Similar questions