わかりました..私は完全な Python マニアであり、Java とそのメソッドを使用したことはほとんどありません。条件は、インストラクターに説明しなければならない Java 関数を持っていることですが、その方法についての手がかりがありません。と説明しています。また、その操作(ループの使用など)に欠陥がある場合はそれを見つける必要があります。最後に、「string」タイプと「string[]」タイプの違いは何ですか?
public static void search(String findfrom, String[] thething){
if(thething.length > 5){
System.err.println("The thing is quite long");
}
else{
int[] rescount = new int[thething.length];
for(int i = 0; i < thething.length; i++){
String[] characs = findfrom.split("[ \"\'\t\n\b\f\r]", 0);
for(int j = 0; j < characs.length; j++){
if(characs[j].compareTo(thething[i]) == 0){
rescount[i]++;
}
}
}
for (int j = 0; j < thething.length; j++) {
System.out.println(thething[j] + ": " + rescount[j]);
}
}
}