Java具有简单性、面向对象、分布式、健壮性、安全性、平台独立与可移植性、多线程、动态性等特点。下面是小编整理的关于java程序员认证考试试题,欢迎大家参考!

1.Which statement about the garbage collection mechanism are true?

A. Garbage collection require additional programe code in cases where multiple threads are running.

B. The programmer can indicate that a reference through a local variable is no longer of interest.

C. The programmer has a mechanism that explicity and immediately frees the memory used by Java objects.

D. The garbage collection mechanism can free the memory used by Java Object at explection time.

E. The garbage collection system never reclaims memory from objects while are still accessible to running user threads.

2. Give the following method:

1) public void method( ){

2) String a,b;

3) a=new String(“hello world”);

4) b=new String(“game over”);

5) System.out.println(a+b+”ok”);

6) a=null;

7) a=b;

8) System.out.println(a);

9) }

In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection.

A. before line 3

B.before line 5

C. before line 6

D.before line 7

E. Before line 9

3. In the class java.awt.AWTEvent,which is the parent class upon which jdk1.1 awt events are based there is a method called getID which phrase accurately describes the return value of this method?

A. It is a reference to the object directly affected by the cause of the event.

B. It is an indication of the nature of the cause of the event.

C. It is an indication of the position of the mouse when it caused the event.

D. In the case of a mouse click, it is an indication of the text under the mouse at the time of the event.

E. It tells the state of certain keys on the keybord at the time of the event.

F. It is an indication of the time at which the event occurred.

4. Which statement about listener is true?

A. Most component allow multiple listeners to be added.

B. If multiple listener be add to a single component, the event only affected one listener.

C. Component don?t allow multiple listeners to be add.

D. The listener mechanism allows you to call an addXxxxListener method as many times as is needed, specifying as many different listeners as your design require.

5.Give the following code:

public class Example{

public static void main(String args[] ){

int l=0;

do{

System.out.println(“Doing it for l is:”+l);

}while(--l>0)

System.out.println(“Finish”);

}

}

Which well be output:

A. Doing it for l is 3

B. Doing it for l is 1

C. Doing it for l is 2

D. Doing it for l is 0

E. Doing it for l is ?C1

F. Finish

6. Give the code fragment:

1) switch(x){

2) case 1:System.out.println(“Test 1”);break;

3) case 2:

4) case 3:System.out.println(“Test 2”);break;

5) default:System.out.println(“end”);

6) }

which value of x would cause “Test 2” to the output:

A. 1

B. 2

C. 3

D. default

7. Give incompleted method:

1)

2) { if(unsafe()){//do something…}

3) else if(safe()){//do the other…}

4) }

The method unsafe() well throe an IOException, which completes the method of declaration when added at line one?

A. public IOException methodName()

B. public void methodName()

C. public void methodName() throw IOException

D. public void methodName() throws IOException

E. public void methodName() throws Exception

8. Give the code fragment:

if(x>4){

System.out.println(“Test 1”);}

else if (x>9){

System.out.println(“Test 2”);}

else {

System.out.println(“Test 3”);}

Which range of value x would produce of output “Test 2”?

A. x<4

B. x>4

C. x>9

D. None

9. Give the following method:

public void example(){

try{

unsafe();

System.out.println(“Test1”);

}catch(SafeException e){System.out.println(“Test 2”);

}finally{System.out.println(“Test 3”);}

System.out.println(“Test 4”);

Which will display if method unsafe () run normally?

A. Test 1

B. Test 2

C. Test 3

D. Test 4

10. Which method you define as the starting point of new thread in a class from which new the thread can be excution?

A. public void start()

B. public void run()

C. public void int()

D. public static void main(String args[])

E. public void runnable()

11.Given the following class definition:

class A{

protected int i;

A(int i){

this.i=i;

}

}

which of the following would be a valid inner class for this class?

Select all valid answers:

A. class B{

}

B. class B extends A{

}

C. class B extends A{

B(){System.out.println(“i=”+i);}

}

D. class B{

class A{}

}

E. class A{}

12. Which modifier should be applied to a method for the lock of object this to be obtained prior to excution any of the method body?

A. synchronized

B. abstract

C. final

D. static

E. public

13. The following code is entire contents of a file called Example.java,causes precisely one error during compilation:

1) class SubClass extends BaseClass{

2) }

3) class BaseClass(){

4) String str;

5) public BaseClass(){

6) System.out.println(“ok”);}

7) public BaseClass(String s){

8) str=s;}}

9) public class Example{

10) public void method(){

11) SubClass s=new SubClass(“hello”);

12) BaseClass b=new BaseClass(“world”);

13) }

14) }

Which line would be cause the error?

A. 9 B. 10 C. 11 D.12

14. Which statement is correctly declare a variable a which is suitable for refering to an array of 50 string empty object?

A. String [] a

B. String a[]

C. char a[][]

D. String a[50]

F. Object a[50]

15. Give the following java source fragement:

//point x

public class Interesting{

//do something

}

Which statement is correctly Java syntax at point x?

A. import java.awt.*;

B.package mypackage

C. static int PI=3.14

D. public class MyClass{//do other thing…} E. class MyClass{//do something…}

16. Give this class outline:

class Example{

private int x;

//rest of class body…

}

Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?

A. Change private int x to public int x

B. change private int x to static int x

C. Change private int x to protected int x

D. change private int x to final int x

17. the piece of preliminary analsis work describes a class that will be used frequently in many unrelated parts of a project

“The polygon object is a drawable, A polygon has vertex information stored in a vector, a color, length and width.”

Which Data type would be used?

A. Vector

B. int

C. String

D. Color

E. Date

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

A. protected

B. public

C. no modifer

D. private

19.Which declares for native method in a java class corrected?

A. public native void method(){}

B. public native void method();

C. public native method();

D. public void method(){native;}

E. public void native method();

20. Which modifer should be applied to a declaration of a class member variable for the value of variable to remain constant after the creation of the object?

21. Which is the main() method return of a application?

A. String

B. byte

C. char

D. void

22. Which is corrected argument of main() method of application?

A. String args

B. String ar[]

C. Char args[][]

D. StringBuffer arg[]

23. “The Employee object is a person, An Employee has appointment store in a vector, a hire date and a number of dependent”

short answer: use shortest statement declare a class of Employee.

24. Give the following class defination inseparate source files:

public class Example{

public Example(){//do something}

protected Example(int i){//do something}

protected void method(){//do something}

}

public class Hello extends Example{//member method and member variable}

Which methods are corrected added to the class Hello?

A. public void Example(){}

B. public void method(){}

C. protected void method(){}

D. private void method(){}

25. Float s=new Float(0.9F);

Float t=new Float(0.9F);

Double u=new Double(0.9);

Which expression?s result is true?

A. s==t

B. s.equals(t)

C. s==u

D. t.equals(u)

26. Give following class:

class AClass{

private long val;

public AClass(long v){val=v;}

public static void main(String args[]){

AClass x=new AClass(10L);

AClass y=new AClass(10L);

AClass z=y;

long a=10L;

int b=10;

}

}

Which expression result is true?

A. a==b;

B. a==x;

C. y==z;

D. x==y;

E. a==10.0;

java 考试,java程序员认证考试试题相关推荐

  1. java中setconstrations_java程序员认证模拟试题及解析

    java程序员认证模拟试题及解析 天将降大任于是人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为.以下是小编为大家搜索整理的java程序员认证模拟试题及解析,希望能给大家带来帮助!更多精 ...

  2. Java程序员认证考试 ---SUN认证

    SUN认证 SUN认证是给网络设计界建立的一套认证标准,Sun公司推出了Java以及Solaris技术认证方案.对于企业而言,可以借助这项认证作为招聘人才的评判标准,或是作为衡量员工技术水准的依据:在 ...

  3. 软考考c语言还是java,计算机程序设计工程师技术水平(java)证书就是计算机技术与软件专业技术资格考试的程序员证书么?...

    满意答案 rfhenry 2013.09.04 采纳率:47%    等级:12 已帮助:9852人 计算机程序设计工程师技术水平(java)证书就是计算机技术与软件专业技术资格考试的程序员证书. 计 ...

  4. oracle ocp认证_OCP Oracle认证专业Java SE 8程序员学习指南II-复习和作者对话

    oracle ocp认证 在招聘技术职位时,传统观点认为,没有什么能比有经验的候选人更胜一筹了,而且许多招聘经理通常可能不会在认证方面投入太多. 但是,Oracle Java认证考试当然是一个例外,因 ...

  5. java程序员二级_Java程序员认证模拟题及详细分析(2)

    Java程序员认证模拟题及详细分析(2) 分类:计算机等级 | 更新时间:2016-07-08| 来源:转载 Java程序员认证模拟题及详细分析(1) 26. Give following class ...

  6. 经典java程序员的面试题及答案

    今天动力节点java培训机构小编为大家分享"经典java程序员的面试题及答案",希望通过此文能够帮助到正在找工作或是即将毕业的"你",下面就随小编一起看看经典j ...

  7. 计算机水平考试 初级,计算机水平考试-初级程序员下午试题模拟38

    计算机水平考试-初级程序员下午试题模拟38 (8页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 9.9 积分 初级程序员下午试题模拟38试题一阅读以下说明 ...

  8. 计算机水平考试试题c,计算机水平考试-初级程序员下午试题模拟6

    计算机水平考试-初级程序员下午试题模拟6 (12页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 9.9 积分 初级程序员下午试题模拟6试题一阅读以下应用程 ...

  9. java中级程序员面试题_中级Java程序员常见面试题汇总

    下面是一些中级Java程序员常见面试题汇总,你可以用它来好好准备面试. 什么是线程? 线程是操作系统能够进行运算调度的最小单位,它被包含在进程之中,是进程中的实际运作单位.程序员可以通过它进行多处理器 ...

  10. 全国计算机软件水平考试试题,全国计算机软件水平考试初级程序员模拟试题.docx...

    1 真理惟一可靠的标准就是永远自相符合 全国计算机软件水平考试初级程序员模拟试题 全国计算机软件水平考试初级程序员模拟试题 上午试卷本试卷的试题中共有 40 个空格,需要全部解答,每个空格 1.875 ...

最新文章

  1. 国家标准油类计算机,食用油新国标正式实施 产品配方将不再是“机密”
  2. ajax怎样发变量,使用jQuery Ajax发送多个变量
  3. 10-5 4-6 查询在具有最小内存容量的所有PC中具有最快处理器的PC制造商 (10 分)
  4. 公司承担的国家发改委高技术产业化示范工程
  5. bouml 逆向分析c++_JS逆向之漫画柜
  6. 完善三个数字对象排序程序。MOOC,Java第四章 面向对象和类 第一次作业
  7. Spring、SpringMVC、SpringBoot、SpringCloud概述
  8. Apache HBase 最新发布2.0.4 ,分布式数据库
  9. cf406E Hamming Triples (推公式)
  10. 老掉牙的ArrayList解析它它它又来了
  11. java调用有道翻译接口
  12. 计算机辅助 高等数学教学,高等数学计算机辅助教学理论的探讨(6页)-原创力文档...
  13. Mysql数据表关系与关联查询
  14. 微信域名防屏蔽防封系统,轻松微信中域名网站被屏蔽被封的问题
  15. ES6 模板字符串基本用法
  16. 小鸟云服务器如何安装rstudio-server?
  17. 互联网信息服务安全评估报告
  18. odoo 仪表盘 大屏设计模块cus_dashboard支持odoo16 15 14 13 12
  19. IDEA 快捷键 代码上移一行 下移一行 快捷键 try catch 块 快捷键
  20. 如何高效学习的一点思考

热门文章

  1. java代码实现 取放_java大对象存取的简单实现的代码
  2. java web打印 闪退_tomcat闪退解决方案
  3. Nginx的安装、启动、停止命令
  4. ollvm源码分析之控制流扁平化(3)
  5. iOS源码分析:Block的本质
  6. position四个属性值的关系
  7. laravel queue(消息队列)的使用实例
  8. LCT(Link Cut Tree)总结
  9. Spring-IOC 扩展点 BeanFactoryPostProcessor及其子接口解析
  10. vue + element ui 阻止表单输入框回车刷新页面