package imooc;import java.util.Arrays;public class HelloWorld {?public static void main(String[] args) {??HelloWorld helloworld = new HelloWorld();??int[]scores = new int[] {23,34,45,21,119,-223,72};??helloworld.Sort(scores); //報錯?}?public void Sort(int[]scores) {??Arrays.sort(scores);??int[]score = new int[3];??int count=0;??for(int i=0;i<scores.length;i++) {???if(scores[i]>100) {????continue;???}???else {????if(count>3) {?????break;????}????else {???????score[count] = scores[i];? //報錯?????count++;????}???}??}??System.out.println(Arrays.toString(score));?}}為什么會報錯 一臉懵逼
求java大神解答
釗兄兄4281648
2017-09-16 20:48:06