(图片大小可自由调整)
2025年计算机考试-Java认证考试近5年真题荟萃附答案
第I卷
一.参考题库(共80题)
1.A?developer?is?designing?a?multi-tier?web?application?and?discovers?a?need?to?log?each?incoming?client?request.?Which?two?patterns,?taken?independently,?provide?a?solution?for?this?problem??()
A、?Transfer?Object
B、?Service?Locator
C、?Front?Controller
D、?Intercepting?Filter
E、?Business?Delegate
F、?Model-View-Controller
2.11.?class?Snoochy?{? 12.?Boochybooch;? 13.?public?Snoochy()?{?booch?=?new?Boochy(this);?}? 14.?}? 15.? 16.?class?Boochy?{? 17.?Snoochy?snooch;? 18.?public?Boochy(Snoochy?s)?{?snooch?=?s;?}? 19.?}? And?the?statements:? 21.?public?static?void?main(String[]?args)?{? 22.?Snoochy?snoog?=?new?Snoochy();? 23.?snoog?=?null;? 24.?//?more?code?here? 25.?}? Which?statement?is?true?about?the?objects?referenced?by?snoog,?snooch,?and?booch?immediately?after?line?23?executes?()?
A、?None?of?these?objects?are?eligible?for?garbage?collection.
B、?Only?the?object?referenced?by?booch?is?eligible?for?garbage?collection.
C、?Only?the?object?referenced?by?snoog?is?eligible?for?garbage?collection.
D、?Only?the?object?referenced?by?snooch?is?eligible?for?garbage?collection.
E、?The?objects?referenced?by?snooch?and?booch?are?eligible?for?garbage?collection.
3.如何创建包?在什么情况下需要在程序里创建包?
4.A?developer?is?designing?a?web?application?that?must?support?multiple?interfaces,?including:?? ??an?XML?web?service?for?B2B ??HTML?for?web-based?clients ??WML?for?wireless?customers?? Which?design?pattern?provides?a?solution?for?this?problem?()
A、?Session?Fa?ade
B、?Business?Delegate
C、?Data?Access?Object
D、?Model-View-Controller
E、?Chain?of?Responsibility
5. What?is?the?Result?()
A、?baz?has?the?value?of?“”.
B、?baz?has?the?value?of?null.
C、?baz?has?the?value?of?“red”
D、?baz?has?the?value?of?“blue”
E、?baz?has?the?value?of?“green”
F、?The?code?does?not?compile.
G