1: D | javac 命令编译指定类和该类依赖的类。编译后的文件为二进制文件class2:C3:B4:C | IOException,runtimeException 编译时不要求强行处理,只在运行期发生。IOException编译时强行要求处理,继承自Exception5:B | Set无序队列,用get(index)游标无法获取6:C 7:A | 不使用关键字相当于...
JAVA面试题求大神帮忙,给满分100分
1-5 D C B C B
6-10 C A D C B
//三-1手打Object[] sub(Object[] a, Object[] b){ List<Object> lista = new ArrayList<Object>(); List<Object> listb = new ArrayList<Object>(); 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
where t1.name = t2.name
三-4
第一次拿4个,只要保证每次拿到6*n + 4就可以了
2013-08-22
1: D | javac 命令编译指定类和该类依赖的类。编译后的文件为二进制文件class2:C3:B4:C | IOException,runtimeException 编译时不要求强行处理,只在运行期发生。IOException编译时强行要求处理,继承自Exception5:B | Set无序队列,用get(index)游标无法获取6:C 7:A | 不使用关键字相当于default8:D | 二进制算法 11为 111 | 10 = 111(只要有一个是1就是1) 也就是119: C | ''表示字节char。"/u0020" 是Unico的空格编码10:B 三
1、 public static Object[] arraySubtract(Object[] array1, Object[] array2) { ArrayList<Object> list = new ArrayList<Object>(); //选出属于数组1但不属于数组2的元素 for(int i = 0; i < array1.length; ++i) { boolean bContained = false; for(int j = 0; j < array2.length; ++j) { if (array1[i].equals(array2[j])) { bContained = true; break; } } if (!bContained) { list.add(array1[i]); } } Object res[] = new Object[list.size()]; for(int i = 0; i < list.size(); ++i) res[i] = list.get(i); return res; } 2、 int count(int n) { int result = 0; for (int i = 1; i < n; i++) { result += i; } return result; }3、select * from A where name in (select name from A group by name having count(name) > 1)2013-08-21
你这是要去用友?2013-08-22