0<scores[i]&&scores[i]<100为什么和0>scores[i]||scores[i]<100输出结果不一样
package com.imooc;
import java.util.Arrays;
public class HelloWorld {
public static void main(String[] args) {
int []scores={89,-23,64,91,119,52,73};
System.out.println("考试前三名的成绩为:");
HelloWorld hello=new HelloWorld();
hello.showTop3(scores);
}
public void showTop3(int []scores){
Arrays.sort(scores);
int num=0;
for (int i=scores.length-1;i>=0;i--){
if(0<scores[i]&&scores[i]<100){
continue;
}
num++;
if(num>3){
break;
}
System.out.println(scores[i]);
}
}
}
0<scores[i]&&scores[i]<100为什么和0>scores[i]||scores[i]<100输出结果不一样?