1、 public static Object[] arraySubtract(Object[] array1, Object[] array2) { ArrayList
回答2:
1-5 D C B C B
6-10 C A D C B
//三-1手打 Object[] sub(Object[] a, Object[] b){ List lista = new ArrayList(); List listb = new ArrayList(); Collections.addAll(listb, b); for (Object obj : a) { if (!listb.contains(obj)) { lista.add(obj); } } return lista.toArray(); } //三-2手打 int count(int n){ int result = 0; int tmp = 1; for (int i = 1; i <=n; i++) { result += tmp * i; } return result; }
三-3
select code,name from A t1,(select name from A group by name having count(0) > 1) t2