A method to return the frequencies of repeated characters
The answer is always the number of all characters in text, not repeated characters! Can I know how to edit it?
public static int freq(String in ) { int frequency = 0; char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray(); for (int j = 0; j < 25; j++) { for (int i = 0; i < in .length(); i++) { if (alphabet[j] == in .charAt(i)) { ++frequency; } } } return frequency; }