设为首页 加入收藏

TOP

What is the result when you compile and run the following code?(二)
2014-11-16 18:20:03 来源: 作者: 【 】 浏览:38
Tags:What the result when you compile and run following code


E Compilation but runtime error at line 10.


Answer:______


**———————————————————————————————–**


8.[Select All]


[a]Vector filelist = ((Directory) file).getList();


[b]String[] filelist = file.directory();


[c]Enumeration filelist = file.contents();


[d]String[] filelist = file.list();


[e]Vector filelist = (new Directory(file)).files();


[Correct Choices]


Answer:______


**———————————————————————————————–**


9.Which most closely matches a description of a Java Map


a) A vector of arrays for a 2D geographic representation


b) A class for containing unique array elements


c) A class for containing unique vector elements


d) An interface that ensures that implementing classes cannot contain duplicate keys


Answer:______


**———————————————————————————————–**


10.Given the uncompleted method:


1)


2) { success = connect();


3} if (success==-1) {


4} throw new TimedOutException();


5} }


6}}


TimedOutException is not a RuntimeException. Which can complete the method of declaration when added at line 1


A. public void method()


B. public void method() throws Exception


C. public void method() throws TimedOutException


D. public void method() throw TimedOutException


E. public throw TimedOutException void method()


Answer:______
1A
2A
3D
4D
5A
6Answer: B
7A The compiler realizes that the get returns an Object reference which needs a cast to type Integer.
8[d]
9d
10bc


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇请问在Asp.net中xml文件与xsl文件.. 下一篇常见hibernate面试题

评论

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