How would I get the indexes of of 'a'?
My current output : 5
int freq = 0;
String s = "Happy days are here again";
char a = 'a';
//processing
for(int i = 0;i<=s.length()-1;i++){
if(s.charAt(i)==a){
freq++;
}//end of if
}//end of for
System.out.println(freq);
Expected output: 1,7,11,20,22