我有一个名为 Word 的类,带有 addWord 方法。
public class Word{
/**constructors exits**/
/**to addWord and return a boolean value of whether the word is successfully added or not**/
public boolean addWord (String[] list){
}
}
public class Test{
public static void main(String[] args){
Scanner input = new Scanner;
String[] wordList = new String[4];
for (int i=0; i<wordList.length; i++){
wordList[i]=input.next();
word.addWord(wordList[i]);
}
}
}
我有
错误说:找不到符号
word.addWord(wordList[i];
我该如何纠正?非常感谢!