public class hhh{
public static void main(String[]args)
{
String s1="hkdhskhegoihwhonfdsaaa";
int count=0;
for(int x=0;x<s1.length();x++) {
if('a'==s1.charAt(x)) count++;
}
System.out.println(count);
}
}
转载于:https://www.cnblogs.com/fantasy12436109/p/3971290.html