网站首页 | J1212大学论坛 | 公务员考试 | CEAC网络工程师 | 软件水平考试 | 专升本考试 | 大学英语4-6级 |计算机等级考试| C/C++编程 | 学习法语 | TOEFL考试资料 | 大学怎么过 | 中英文歌词下载 | 免费资料下载 | 大学知识面 | Linux网络课程 | Java/JSP教程 | 古诗词选录|
公告消息
大学生考试网站

  本站为大学生考试提供全面,及时,准确的服务!还为当代大学生提供学习生活的指点。来源于大学生,服务到大学生中去,是本站的理念!免费是本站的筹码!
栏目分类
 南昌大学计算机系92班级论坛

 ■考试中心
 ◆软件水平考试
 ◆专升本考试
 ◆公务员考试
 ◆CEAC网络工程师
 ◆大学英语四六级
 ◆计算机等级考试
 ◆Toefl考试资料

 大学生频道
 ◆Java/JSP教程
 ◆Linux网络课程
 ◆C/C++编程
 ◆大学怎么过
 ◆大学知识面
 ◆经典英文演讲录音
 ◆招聘信息就业指导
 ◆学习法语
 ◆古诗词选
 下载频道
 ◆电脑软件
 ◆中英文歌词下载
 ◆学习资料
 图库频道
 ◆大学时代相册
 ◆经典图片
 影视频道
 ◆FLASH专区
 ◆站长之家
 ◆站长留言簿
 
 
网站首页 --> Java/JSP编程

JAVA第二次测试11-20题

为了减少大家的麻烦,决定将答案同时给出。
11Which statements about inheritance are true?

A. In Java programming language only allows single inheritance.
B. In Java programming language allows a class to implement only one interface.
C. In Java programming language a class cannot extend a class and implement a interface together.
D. In Java programming language single inheritance makes code more reliable.
(a,d)
121) class Person {
2) public void printValue(int i, int j) {//... }
3) public void printValue(int i){//... }
4) }
5) public class Teacher extends Person {
6) public void printValue() {//... }
7) public void printValue(int i) {//...}
8) public static void main(String args[]){
9) Person t = new Teacher();
10) t.printValue(10);
11) }
Which method will the statement on line 10 call?

A. on line 2
B. on line 3
C. on line 6
D. on line 7
(d)
13Which are not Java primitive types?

A. short
B. Boolean
C. unit
D. float


(bc)
14Use the operators "<<", ">>", which statements are true?

A. 0000 0100 0000 0000 0000 0000 0000 0000<<5 gives
1000 0000 0000 0000 0000 0000 0000 0000
B. 0000 0100 0000 0000 0000 0000 0000 0000<<5 gives
1111 1100 0000 0000 0000 0000 0000 0000
C. 1100 0000 0000 0000 0000 0000 0000 0000>>5 gives
1111 1110 0000 0000 0000 0000 0000 0000
D. 1100 0000 0000 0000 0000 0000 0000 0000>>5 gives
0000 0110 0000 0000 0000 0000 0000 0000


(ac)
15Which of the following range of int is correct?

-27 -- 27-1
0 – 232-1
–215 -- 215-1
–231 -- 231-1

(d)
16Which keyword should be used to enable interaction with the lock of an object? The flag allows exclusive access to that object.

A. transient
B. synchronized
C. serialize
D. static


(b)
17Which is the return type of the method main()?

A. int
B. void
C. boolean
D. static


(b)
18Given the following code:
if (x>0) { System.out.println("first"); }
else if (x>-3) { System.out.println("second"); }
else { System.out.println("third"); }
Which range of x value would print the string "second"?

A. x > 0
B. x > -3
C. x <= -3
D. x <= 0 & x > -3
(d)
19Given the following expression about TextField which use a proportional pitch font.
TextField t = new TextField("they are good",40);
Which statement is true?

A. The displayed string can use multiple fonts.
B. The maximum number of characters in a line will be 40.
C. The displayed width is exactly 40 characters.
D. The user can edit the characters.
(d)
20Which statements about the garbage collection are true?

A. The program developer must create a thread to be responsible for free the memory.
B. The garbage collection will check for and free memory no longer needed.
C. The garbage collection allow the program developer to explicity and immediately free the memory.
D. The garbage collection can free the memory used java object at expect time.
(b)

 


 

   友好链接:

  EditRegion5
首 页 网站介绍 支持论坛 南昌大学计算机系92级班级论坛 联系我们
@j1212.com版权所有,本站所有资料内容和图片文章未经j1212.com或作者本人同意,其他媒体一律不得转载@
Copyright@http://www.j1212.com all rights reserved
Powered by www.j1212.com