我知道这是简单的,但由于某种原因,我不能让这个循环工作。帮助是非常赞赏为什么我的for循环不能在文本文件中打印出值?
public Instructor()
{
// initialise instance variables
writeMap = new HashMap<String,String>();
notRecognised = new ArrayList<String>();
help = new FileHelper();
notRecognised = help.readAList("missed.txt");
for(String i : notRecognised.length) {
System.out.println(i);
}
}
你期望'notRecognised.length'返回一个'String'吗? –