请教大佬们,数组怎么往里添加偶数并排序
package helloWorld;
public class notOdd {
public static void main(String[] args) {
int[] array={25,46,39,75,89,26,100};
System.out.println("输出:");
notOdd hello=new notOdd();
hello.range(array);
}
public void range(int[] array){
int num=0;
for(int i=0;i<array.length||num>0;i++){
if(array[i]%2!=0){
continue;
}
num++;
System.out.println(array[i]);
}
}
}