Computer Science, asked by sujal123457, 1 year ago

write a program to find the frequency of each character in given word in java​

Answers

Answered by yenula
2

Answer:

In this program, you'll learn to find the occurence (frequency) of a character in a given string.

...

Java Program to Find the Frequency of Character in a String

public class Frequency {

String str = "This website is awesome.";

char ch = 'e';

int frequency = 0;

for(int i = 0; i < str. ...

if(ch == str. ...

++frequency;

}

Similar questions