使用Java语言的先进的面向对象特点,包括方法重载,方法覆盖,抽象类,接口,final,static和访问控制;实现文件的输入输出I/O。下面是小编整理的关于Java认证考试试题,希望大家认真阅读!

question 1

which of the following lines will compile without warning or error.

1 float f=1.3;

2 char c='a';

3 byte b=257;

4 boolean b=null;

5 int i=10;

answer to question 1

question 2

what will happen if you try to compile and run the following code

public class myclass {

public static void mainstring arguments[] {

amethodarguments;

}

public void amethodstring[] arguments {

system.out.printlnarguments;

system.out.printlnarguments[1];

}

}

1 error can´t make static reference to void amethod.

2 error method main not correct

3 error array must include parameter

4 amethod must be declared with string

answer to question 2

question 3

which of the following will compile without error

1

import java.awt.*;

package mypackage;

class myclass {}

2

package mypackage;

import java.awt.*;

class myclass{}

3

/*this is a comment */

package mypackage;

import java.awt.*;

class myclass{}

answer to question 3

question 4

a byte can be of what size

1 -128 to 127

2 -2 power 8 -1 to 2 power 8

3 -255 to 256

4depends on the particular implementation of the java virtual machine

answer to question 4

question 5

what will be printed out if this code is run with the following command line?

java myprog good morning

public class myprog{

public static void mainstring argv[]

{

system.out.printlnargv[2]

}

}

1 myprog

2 good

3 morning

4 exception raised: 'java.lang.arrayindexoutofboundsexception: 2'

answer to question 5

question 6

which of the following are keywords or reserved words in java?

1 if

2 then

3 goto

4 while

which of the following statements are true?

1 methods cannot be overriden to be more private

2 static methods cannot be overloaded

3 private methods cannot be overloaded

4 an overloaded method cannot throw exceptions not checked in the base class

answer to question 16

question 17

what will happen if you attempt to compile and run the following code?

class base {}

class sub extends base {}

class sub2 extends base {}

public class cex{

public static void mainstring argv[]{

base b=new base;

sub s=sub b;

}

}

1 compile and run without error

2 compile time exception

3 runtime exception

answer to question 17

question 18

which of the following statements are true?

1 system.out.println -1 >>> 2;will output a result larger than 10

2 system.out.println -1 >>> 2; will output a positive number

3 system.out.println 2 >> 1; will output the number 1

4 system.out.println 1 <<< 2; will output the number 4

answer to question 18

question 19

what will happend when you attempt to compile and run the following code?

public class tux extends thread{

static string sname = 'vandeleur';

public static void mainstring argv[]{

tux t = new tux;

t.piggysname;

system.out.printlnsname;

}

public void piggystring sname{

sname = sname + ' wiggy';

start;

}

public void run{

forint i=0;i < 4; i++{

sname = sname + ' ' + i;

}

}

}

1 compile time error

2 compilation and output of 'vandeleur wiggy'

3 compilation and output of 'vandeleur wiggy 0 1 2 3'

4 compilation and probably output of 'vandeleur' but possible output of 'vandeleur 0 1 2 3'

answer to question 19

question 20

what will be displayed when you attempt to compile and run the following code

//code start

java 认证考试题,2017年Java认证考试试题相关推荐

  1. 2015中学计算机考试题,2017年初中信息技术考试试题及答案

    2017年初中信息技术考试试题及答案 1.frontpage中,网页文件的扩展名是______ b .html 2.硬盘工作时应特别注意避免 c 震动 3.在windows2000的"资源管 ...

  2. j计算机一级考试题,2017全国计算机一级考试试题与答案

    2017全国计算机一级考试试题与答案 1.微型计算机硬件系统中最核心的部件是( ). 答案:B A.主板   B.CPU   C.内存储器   D.I/O设备 2.下列术语中,属于显示器性能指标的是( ...

  3. 计算机辅助绘图考试题,2017年CAD绘图员考试试题「附答案」

    2017年CAD绘图员考试试题「附答案」 一.单选题 1. 设置光标大小需在[选项]对话框中的( )选项卡中设置.D (A) 草图 (B) 打开和保存 (C) 系统 (D) 显示 2.在进行文字标注时 ...

  4. 2017大学计算机考试题,2017大学计算机一级考试试题(含答案)

    2017大学计算机一级考试试题(含答案) A.用鼠标左键单击软键盘上的Esc键 B.用鼠标右键单击软键盘上的Esc键 C.用鼠标右键单击中文输入法状态窗口中的"开启/关闭软键盘"按 ...

  5. 2017大学计算机考试题,2017大学计算机一级考试试题(含答案)(2)

    A.用鼠标左键单击软键盘上的Esc键 B.用鼠标右键单击软键盘上的Esc键 C.用鼠标右键单击中文输入法状态窗口中的"开启/关闭软键盘"按钮 D.用鼠标左键单击中文输入法状态窗口中 ...

  6. 高等学校计算机一级考试题库,2017全国计算机一级考试试题库

    2017全国计算机一级考试试题库 2017全国计算机一级考试试题库有哪一些?下面是CN人才小编收集整理的2017全国计算机一级考试试题库,欢迎阅读参考!~ 2017全国计算机一级考试试题库 单选题 1 ...

  7. 英语口语六级模拟测试软件,2017英语六级口语考试试题及答案_英语六级口语试题及答案 doc完整版...

    2017英语六级口语考试试题及答案doc下载.英语六级口语考试已经成为过去,但是还有不少的考生们还在为自己的失误而感到自责.今天,小编辛苦的收集到2017年全新的英语六级口语试题及答案:为大家考失误的 ...

  8. 2017计算机中小学水平考试,2017全国计算机等级考试试题

    2017全国计算机等级考试试题 一.选择题 1.在计算机领域中通常用MIPS来描述______. A.计算机的运算速度 B.计算机的可靠性 C.计算机的可运行性 D.计算机的可扩充性 2.微型计算机存 ...

  9. 2017c语言考核册答案,2017年C语言考试试题附答案

    子曰:"由,诲女知之乎?知之为知之,不知为不知,是知也."以下是小编为大家搜索整理2017年C语言考试试题附答案,希望能给大家带来帮助!更多精彩内容请及时关注我们应届毕业生考试网! ...

  10. 2017.11.25 计算机一级,2017计算机一级MSOffice考试试题

    2017计算机一级MSOffice考试试题 (16)十进制数59转换成二进制整数是 A)0110011 B)0111011 C)0111101 D)0111111 (17)根据汉字国标GB 2312- ...

最新文章

  1. 20165203《Java程序设计》第二周Java学习总结
  2. 黑马程序员C语言基础(第三天)
  3. 人工机器:NDC-谷歌机器翻译破世界纪录,仅用Attention模型,无需CNN和RNN
  4. JAVA的extends用法
  5. [Hei-Ocelot-Gateway ].Net Core Api网关Ocelot的开箱即用版本
  6. (lucas) Saving Beans
  7. 给刚入行的存储工程师10+1点建议
  8. 代数式对应的C语言表达式不等价的是( ),C语言重修复习题分析.doc
  9. 嵌入式Linux之旅——环境搭建篇之烧写整个系统
  10. Linux 命令之 tar 备份与解压缩
  11. 数字滤波器及GUI界面的设计(MATLAB)
  12. 简约实用个人简历自我介绍PPT模板
  13. CPU内部原理,一文解析
  14. 2021-03-11 Android 异常情况下长按power按键10s关机或者重启
  15. WIN系统仿MAC任务栏工具分享——RocketDock
  16. qiankun前端微服务框架-同一服务器同一端口
  17. APISpace 二维码生成器API
  18. LR参数化,参数化类型:Fille类型--参数分配与取值规律
  19. TensorFlow神经网络学习笔记
  20. 智能指针shared_ptr引用计数工作原理

热门文章

  1. Qss设置属性不进Set函数
  2. Day002_LInux基础_常用命令
  3. js通过FormData对象 异步提交文件 实现文件上传(附带参数)
  4. 数据库开发基础-教案-2
  5. Lenovo E46A-Win 7_无线灯亮但无法启动(耽误3天以上您信吗.....)问题: wlan autoconfig 依赖服务或组无法启动...
  6. emacs操作方法总结
  7. NameNode DataNode
  8. cvResize() 图像放缩
  9. qt自定义QtWidgets
  10. python numpy 里面的[:, None]是个什么鬼?[..., None]呢?