int j =0; for(int n=0;n<str1.length();n++) { String s=str1.substring(n,n+1); if(s.equals("i")){ j++; } } System.out.println(j);
转载于:https://www.cnblogs.com/Yue0327/p/5124955.html
int j =0; for(int n=0;n<str1.length();n++) { String s=str1.substring(n,n+1); if(s.equals("i")){ j++; } } System.out.println(j);
转载于:https://www.cnblogs.com/Yue0327/p/5124955.html