尝试编译我的程序时出现以下错误。
预期为“(”或“[”。
public AccountArrayList()
{
// line one below is the hi-lighted code
ArrayList accounts = new ArrayList;
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add("1");
accounts.add(5,"900");
}
谢谢。
您在构造函数中缺少括号:
ArrayList accounts = new ArrayList();
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)