Programming Code Center(PCC)
[JAVA]

(PCC)::[How-to-write-Java-Program-to-Find-the-Frequency-of-Character-in-a-String]::[java]

File Name : Frequency.java

//Example: Find Frequency of Character
public class Frequency {

    public static void main(String[] args) {
        String str = "This website is awesome.";
        char ch = 'e';
        int frequency = 0;

        for(int i = 0; i < str.length(); i++) {
            if(ch == str.charAt(i)) {
                ++frequency;
            }
        }

        System.out.println("Frequency of " + ch + " = " + frequency);
    }
}

Output :

Frequency.jpg