class MyClass {
public static void remove_stopwords(String[] query, String[] stopwords) {
A: for (int i = 0; i < query.length; i++) {
B: for (int j = 0; j < stopwords.length; j++) {
C: if (query[i].equals(stopwords[j])) {
break B;
}
else {
System.out.println(query[i]);
break B;
}
}
}
}
}
何らかの理由で、このコードは問題の途中でしか正しく機能しません。クエリから最初のストップワードを取り出しますが、残りは無視します。どんな助けでも大歓迎です。