标签:Stub eth static 顺序 ted ring new gen string
public class delTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int alist[]=new int[10];
alist[0]=1;
alist[1]=2;
alist[2]=3;
alist[3]=4;
alist[4]=5;
alist[5]=6;
alist[6]=7;
del(alist,2);
forprint(alist);
}
public static void del(int[] alis,int value) {
for(int i=0;i<alis.length;i++) {
if(alis.length==0) {
System.out.println("数组为空!");
}
if(i==value) {
for (int j = value; j < alis.length; j++) {
alis[j-1]=alis[j];
}
}
}
}
public static void forprint(int[] alis) {
for(int i = 0;i<alis.length;i++) {
System.out.print(alis[i]);
}
}
}
标签:Stub eth static 顺序 ted ring new gen string
原文地址:https://www.cnblogs.com/had1314/p/11161239.html