为了账号安全,请及时绑定邮箱和手机立即绑定

scores cannot be resolved to a variable

Exception in thread "main" java.lang.Error: Unresolved compilation problem: scores cannot be resolved to a variable 怎么回事

public class HelloWorld {

public static void main(String[] args) {

int[] socres= {58,56,945,35,16};

System.out.println("bla"+scores[1]);

}

}


正在回答

2 回答

代码int[] 后面是scores不是socres,你拼错了!

0 回复 有任何疑惑可以回复我~

亲 单词写错了  System.out.println("bla"+scores[1]);   改成socres  就可以了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

scores cannot be resolved to a variable

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号