/*
把数组int old[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5};中的0去掉生成新数组*/
public class Test05{
public static void main(String args[]){
int old[] = {1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5};
int a[]=new int[12];
for(int i=0;i<old.length;i++){
if(old!=0){
for(int j=0;j<old.length;j++){
a[j]=old;
}
}
}
for(int c=0;c<a.length;c++){
System.out.println(a[c]);
}
}
}
这个是我写的 貌似报错找不到主方法
Could not find the main class: org.apache.fop.cli.Main. Program will exit.
Exception in thread "main" |
|