1.

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

Answer»

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;

}



Discussion

No Comment Found