从一个整型数组只,把值为0的项掉,并将不为0的值存入一个新数组中,逐项输出 public class Test{public static void main(String[] args){ int oldArr[]={1,2,3,5,0,0,6,6,0,5,4,7,6,7,0,5}; int num=0; for(int i=0;i
public class Test{ public static void main(String[] args){ int oldArr[]={1,2,3,5,0,0,6,6,0,5,4,7,6,7,0,5}; int num=0; for(int i=0;i