String[] subjects =new String[5] ; // 分别为数组中的元素赋值 subjects[0] = "Oracle"; subjects[1] = "PHP"; subjects[2] = "Linux"; subjects[3] = "Java"; subjects[4] = "HTML"; System.out.println("数组中第4个科目为:" + subject[3] ); } }怎么过不了。
数组名写错了。 subject[3]少个s啊,应该是subjects[3]