Created
October 11, 2010 13:14
-
-
Save alexzhan/620485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 不能用来修饰interface的有() | |
A private B public C protected D static | |
3 下列正确的有() | |
A call by value 不会改变实际参数的数值 B call by reference 能改变实际参数的引用地址 | |
C call by reference不能呢个改变实际参数的引用地址 D call by reference不会改变实际参数的内容 | |
7 怎样让jvm自动开始垃圾回收过程? | |
A 不能 | |
C 调用System.gc(); | |
8 如下代码运行结果是: | |
public class Main implements Runnable { | |
public void run() { | |
System.out.print("running"); | |
} | |
public static void main(String[] args) { | |
Thread t = new Thread(new Main()); | |
t.run(); | |
t.run(); | |
t.start(); | |
} | |
} | |
A 运行时抛出异常 B 正常运行并打引输出"running" | |
C 正常运行并打引输出"runningrunning" | |
D 正常运行并打引输出"runningrunningrunning" | |
8 提供java存取数据库能力的包是() | |
A java.sql B java.swt C java.lang D java.swing | |
9 在java中能实现多重继承效果的方式是() | |
A 内部类 B 适配器 C 接口 D 同步 | |
11 已知一个二叉树前序和中序遍历分别是,则 | |
12下列代码的输出是() | |
public class HelloWorld | |
{ | |
static | |
{ | |
System.out.println("static init"); | |
} | |
{ | |
System.out.println("normal init"); | |
} | |
public HelloWorld() | |
{ | |
System.out.println("constructor init"); | |
} | |
public static void main(String[] args) | |
{ | |
System.out.println("main"); | |
new HelloWord(); | |
} | |
} | |
16与逆波兰表达式ab+cd+*对应的中缀表达式是() | |
A a*b*c*d C (a+b)*(c+d) D a+b*c+d | |
17 下列程序解释正确的是: | |
count = 0; | |
n=100; | |
for(int i=0; i<n; i++) { | |
count = (i%2==0)?i:0; | |
} | |
A 求100以内的奇数和 B 求99以内的奇数和 | |
C 求100以内的偶数和 D 求99以内的偶数和 | |
18 下列哪些情况可以中止当前线程的执行() | |
A 抛出一个异常时 B 当该线程调用sleep()方法时 | |
C 当创建一个新线程时 D | |
19 如下程序程序的返回值是() | |
try{ | |
int num = 1/0; | |
return 1; | |
}catch(Exception e) { | |
return -1; | |
}finally { | |
return 1; | |
} | |
A -1 B 0 C 1 D 抛出异常 | |
20 高度为h的完全二叉树节点数最多有() | |
A 2^h-1 B 2^h+1 C 2h-1 D 2h+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment