删除数组项
//NowJava.com //package com.nowjava; import java.util.ArrayList; import java.util.List; public class Main { public final static Integer[] removeArrayItem(Integer[] array, Integer item) { List<Integer> list = new ArrayList<Integer>(); for (Integer arrayItem : array) { if (!arrayItem.equals(item)) list.add(arrayItem); } Integer[] ret = new Integer[list.size()]; list.toArray(ret); return ret; }/*时代Java公众号 - N o w J a v a . c o m 提供*/ }