2025年计算机考试-Java认证考试近5年真题集锦(频考类试题)带答案.docx

2025年计算机考试-Java认证考试近5年真题集锦(频考类试题)带答案.docx

此“教育”领域文档为创作者个人分享资料,不作为权威性指导和指引,仅供参考
  1. 1、本文档共39页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多

(图片大小可自由调整)

2025年计算机考试-Java认证考试近5年真题集锦(频考类试题)带答案

第I卷

一.参考题库(共80题)

1.有关hashMap跟hashTable的区别,说法正确的是()。

A、HashMap和Hashtable都实现了Map接口

B、HashMap是非synchronized,而Hashtable是synchronized

C、HashTable使用Enumeration,HashMap使用Iterator

D、Hashtable直接使用对象的hashCode,HashMap重新计算hash值,而且用与代替求模

2. What?is?the?result?()

A、?The?program?runs?and?prints?“0”

B、?The?program?runs?and?prints?“1”

C、?The?program?runs?but?aborts?with?an?exception.

D、?An?error?“possible?undefined?variable”?at?line?5?cause?compilation?to?fail.

E、?An?error?“possible?undefined?variable”?at?line?10?cause?compilation?to?fail.

3.import?java.io.IOException;?? public?class?ExceptionTest(?? public?static?void?main?(Stringargs)? try?(?? methodA();?? )?catch?(IOException?e)?(?? system.out.printIn(“Caught?IOException”);? )?catch?(Exception?e)?(?? system.out.printIn(“Caught?Exception”);?? )?? )?? public?void?methodA?()?{?? throw?new?IOException?();? }???? What?is?the?result?()??

A、?The?code?will?not?compile.

B、?The?output?is?caught?exception.

C、?The?output?is?caught?IOException.

D、?The?program?executes?normally?without?printing?a?message.

4.What?is?the?result?()

A、0.0

B、Compilation?fails.

C、A?ParseException?is?thrown?by?the?parse?method?at?runtime.

D、A?NumberFormatException?is?thrown?by?the?parse?method?at?runtime.

5.Click?the?’Select?and?Place’?button. Place?the?events?in?the?order?they?occur.

6.类的可访问性不影响类成员的可访问性

7.Which?two?are?valid?declarations?of?char?()

A、?Char?ch?=?“a”;

B、?char?ch?=?“”;

C、?char?ch?=?“café”;

D、?char?ch?=?“ucafe”;

E、?char?ch?=?“ucafe’;

F、?char?ch?=?“u10100’;

G、?char?ch?=?(char)?true;

8.public?class?Employee{?????? private?String?name;? public?Employee(String?name){?????????? ?=?name;??????}? public?void?display(){???????? System.out.print(name);??????}?}? public?class?Manager?extends?Employee{?????? private?String?d

您可能关注的文档

文档评论(0)

米宝宝(全国)edu + 关注
官方认证
服务提供商

职业资格类、公考事业编、考研考博、行业研探,本公司以诚挚的热情服务每一位客户,助力您成功的每一步‘!

认证主体成都米宝宝科技有限公司
IP属地四川
统一社会信用代码/组织机构代码
91510100MA6ADN553Y

1亿VIP精品文档

相关文档