设为首页 加入收藏

TOP

德邦java面试题(三)
2014-11-24 01:40:39 来源: 作者: 【 】 浏览:31
Tags:德邦 java 试题
utput is 10;


Question 17)


Which two cannot directly cause a thread to stop executing
1)exiting from a synchronized block
2)calling the wait method on an object
3)calling the notify method on an object
4)calling a read method on an InputStream object
5)calling the setPriority method on a thread object


Question 18)


Which of the following are correct, if you compile the following code


public class CloseWindow extends Frame implements WindowListener {


public CloseWindow() {


addWindowListener(this); // This is listener registration
setSize(300, 300);
setVisible(true); }


public void windowClosing(WindowEvent e) {


System.exit(0); }
public static void main(String args[]) {


CloseWindow CW = new CloseWindow(); } }


1) Compile time error
2) Run time error
3) Code compiles but Frames does not listen to WindowEvents
4) Compile and runs successfully


Question 19)


Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms


1) Objects are deleted when they can no longer be accessed through any reference.
2) The finalize() method will eventually be called on every object.
3) The finalize() method will never be called more than once on an object.
4) An object will not be garbage collected as long as it is possible for an active part of the program to access it through a reference.
5) The garbage collector will use a mark and sweep algorithm.


Question 20)


A class design requires that a member variable should be accessible only by same package,which modifer word should be used


1) protected


2) public


3) no modifer


4) private


二.简答题。(80) (请注意字迹填写工整)


2.1 说明SQL语言中的Select中的Having子句作用。(5)


2.2 解释Union All与Union的区别。(5)


2.3 现有关系数据库如下 (20)


学生(学号,姓名,性别,专业,奖学金) 课程(课程号,名称,学分) 学习(学号,课程号,分数) 用SQL语言实现以下四小题。


1、 检索没有获得奖学金、同时至少有一门课程成绩在95分以上的学生信息,包括学号、姓名、专业。(5)


2、 检索没有任何一门课程成绩在80分以下的所有学生信息,包括学号、姓名、专业。(5)


3、 对成绩得过满分(100分)的学生,如果没有获得奖学金的,将其奖学金设为1000元。(5)


4、 定义学生成绩得过满分(100分)的课程视图vwAAA,包括课程号、名称和学分。(5)


2.5 用java实现快速排序算法。(5)


2.6 RuntimeException与Exception的区别,并列举你所知道的RuntimeException类。(5)


2.7 ArrayList和Vector,HashMap,Hashtable哪些是线程安全的。HashMap和Hashtable哪个可以用null作为key和value。(5)


2.8 抽象类与接口的相同与不同的描述?(5)


2.9 请把”ab”,”ef”,”cd”,”ij”,”gh”这5个字符串按给定的顺序加入到一个List对象,然后对该List对象进行快速排序,并打印结果(用java代码实现)。(5)


2.10 拷贝c:\temp.txt文件为c:\temp2.txt文件(用java代码实现)(5


2.11 JNDI的全称是什么,简单描述它的用途。(5


2.12 JDBC中Statement和PreparedStatement有什么不同?简要说明PreparedStatement对性能的影响(5


2.13 请完成程序,查询table1表中field1字段的值是1的纪录,并将查询结果定位到查询结果中的第三行并打印第三行的vcField的值,field1字段类型是number(用java代码实现)。 (5


2.14 线程有哪两种实现方法 (5



首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇用递归算法解决汉塔问题 下一篇算法面试题 精心收集

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: