求大神解答
public class Demo {
public static void main(String[] args) {
// TODO Auto-generated method stub
String[] str={"abcdaabesase"};
int count=0;
for(int i=0;i<str.length;i++){
if(str[i]=="a"){
count++;
}
}
System.out.println("a字母出现"+count+"次"); //结果什么是0次啊
}
}