哪位大神帮我看看为什么我这个程序运行无结果,谢谢?
package com.imooc;
import java.util.Arrays;
public class HelloWorld {
public int[] getScores(int[] scores){
Arrays.sort(scores);
int j = 0;
int[] newScores = new int[j];
for(int i = 0;i < scores.length;i++){
if(scores[i] < 0&&scores[i] > 100){
continue;
}
else{
newScores[j] = scores[i];
j++;
}
}
return newScores;
}
public static void main(String[] args){
HelloWorld hello = new HelloWorld();
int[] scores = {89,-23,64,91,119,52,73};
int[] newScores = hello.getScores(scores);
System.out.println(Arrays.toString(newScores));
}
}