Thanks for the help, I finished it today, I think it is good!
public class NewClass55 {
public static void main(String[] args) {
int abcd = 0;
char[] alphabetArray = new char[26];
int[] CountArray = new int[26];
for (char i = 'A'; i <= 'Z'; i++, abcd++) {
alphabetArray[abcd] = i;
CountArray[abcd] = 0;
}
String text = "apple";
String toUpperCase = text.toUpperCase();
char[] textArray = new char[text.length()];
for (int i = 0; i < text.length(); i++) {
textArray[i] = toUpperCase.charAt(i);
}
for (int i = 0; i < alphabetArray.length; i++) {
for (int c = 0; c < textArray.length; c++) {
if (alphabetArray[i] == textArray[c]) {
CountArray[i]++;
}
}
}
for (int i = 0; i < alphabetArray.length; i++) {
if(CountArray[i]>0)
System.out.print(alphabetArray[i] + ": "+ CountArray[i]+", ");
}
}
}