|
SUN CERTIFIED PROGRAMMER FOR THE JAVA 2 PLATFORM 1.4
Purchase:Suntraining
Availableat:AuthorizedPrometrictestingcenters
Examnumber:CX-310-035
Prerequisites:None
Examtype:Multiplechoiceandshortanswer
Numberofquestions:61
Passscore:52%(32of61questions)
Timelimit:120minutes
Cost:US$150,oraspricedinthecountrywheretheexamistaken
ExamObjectives:
SUNCERTIFIEDPROGRAMMERFORJAVA[tm]2PLATFORM1.4
SECTION1:DECLARATIONSANDACCESSCONTROL
Writecodethatdeclares,constructsandinitializesarraysofanybasetypeusinganyofthepermittedformsbothfordeclarationandforinitialization.
Declareclasses,nestedclasses,methods,instancevariables,staticvariablesandautomatic(methodlocal)variablesmakingappropriateuseofallpermittedmodifiers(suchaspublic,final,static,abstract,etc.).Statethesignificanceofeachofthesemodifiersbothsinglyandincombinationandstatetheeffectofpackagerelationshipsondeclareditemsqualifiedbythesemodifiers.
Foragivenclass,determineifadefaultconstructorwillbecreatedandifsostatetheprototypeofthatconstructor.
Identifylegalreturntypesforanymethodgiventhedeclarationsofallrelatedmethodsinthisorparentclasses.
SECTION2:FLOWCONTROL,ASSERTIONS,ANDEXCEPTIONHANDLING
Writecodeusingifandswitchstatementsandidentifylegalargumenttypesforthesestatements.
Writecodeusingallformsofloopsincludinglabeledandunlabeled,useofbreakandcontinue,andstatethevaluestakenbyloopcountervariablesduringandafterloopexecution.
Writecodethatmakesproperuseofexceptionsandexceptionhandlingclauses(try,catch,finally)anddeclaresmethodsandoverridingmethodsthatthrowexceptions.
Recognizetheeffectofanexceptionarisingataspecifiedpointinacodefragment.Note:Theexceptionmaybearuntimeexception,acheckedexception,oranerror(thecodemayincludetry,catch,orfinallyclausesinanylegitimatecombination).
Writecodethatmakesproperuseofassertions,anddistinguishappropriatefrominappropriateusesofassertions.
Identifycorrectstatementsabouttheassertionmechanism.
SECTION3:GARBAGECOLLECTION
Statethebehaviorthatisguaranteedbythegarbagecollectionsystem.
Writecodethatexplicitlymakesobjectseligibleforgarbagecollection.
Recognizethepointinapieceofsourcecodeatwhichanobjectbecomeseligibleforgarbagecollection.
SECTION4:LANGUAGEFUNDAMENTALS
Identifycorrectlyconstructedpackagedeclarations,importstatements,classdeclarations(ofallformsincludinginnerclasses)interfacedeclarations,methoddeclarations(includingthemainmethodthatisusedtostartexecutionofaclass),variabledeclarations,andidentifiers.
Identifyclassesthatcorrectlyimplementaninterfacewherethatinterfaceiseitherjava.lang.Runnableorafullyspecifiedinterfaceinthequestion.
Statethecorrespondencebetweenindexvaluesintheargumentarraypassedtoamainmethodandcommandlinearguments.
IdentifyallJavaprogramminglanguagekeywords.Note:Therewillnotbeanyquestionsregardingesotericdistinctionsbetweenkeywordsandmanifestconstants.
Statetheeffectofusingavariableorarrayelementofanykindwhennoexplicitassignmenthasbeenmadetoit.
Statetherangeofallprimitiveformats,datatypesanddeclareliteralvaluesforStringandallprimitivetypesusingallpermittedformatsbasesandrepresentations.
SECTION5:OPERATORSANDASSIGNMENTS
Determinetheresultofapplyinganyoperator(includingassignmentoperatorsandinstanceof)tooperandsofanytypeclassscopeoraccessibilityoranycombinationofthese.
Determinetheresultofapplyingthebooleanequals(Object)methodtoobjectsofanycombinationoftheclassesjava.lang.String,java.lang.Booleanandjava.lang.Object.
Inanexpressioninvolvingtheoperators&,|,&&,||andvariablesofknownvaluesstatewhichoperandsareevaluatedandthevalueoftheexpression.
Determinetheeffectuponobjectsandprimitivevaluesofpassingvariablesintomethodsandperformingassignmentsorothermodifyingoperationsinthatmethod.
SECTION6:OVERLOADING,OVERRIDING,RUNTIMETYPEANDOBJECTORIENTATION
Statethebenefitsofencapsulationinobjectorienteddesignandwritecodethatimplementstightlyencapsulatedclassesandtherelationships"isa"and"hasa".
Writecodetoinvokeoverriddenoroverloadedmethodsandparentaloroverloadedconstructors;anddescribetheeffectofinvokingthesemethods.
Writecodetoconstructinstancesofanyconcreteclassincludingnormaltoplevelclassesandnestedclasses.
SECTION7:THREADS
Writecodetodefine,instantiateandstartnewthreadsusingbothjava.lang.Threadandjava.lang.Runnable.
Recognizeconditionsthatmightpreventathreadfromexecuting.
Writecodeusingsynchronizedwait,notifyandnotifyAlltoprotectagainstconcurrentaccessproblemsandtocommunicatebetweenthreads.
Definetheinteractionamongthreadsandobjectlockswhenexecutingsynchronizedwait,notifyornotifyAll.
SECTION8:FUNDAMENTALCLASSESINTHEJAVA.LANGPACKAGE
Writecodeusingthefollowingmethodsofthejava.lang.Mathclass:abs,ceil,floor,max,min,random,round,sin,cos,tan,sqrt.
DescribethesignificanceoftheimmutabilityofStringobjects.
Describethesignificanceofwrapperclasses,includingmakingappropriateselectionsinthewrapperclassestosuitspecifiedbehaviorrequirements,statingtheresultofexecutingafragmentofcodethatincludesaninstanceofoneofthewrapperclasses,andwritingcodeusingthefollowingmethodsofthewrapperclasses(e.g.,Integer,Double,etc.):
doubleValue
floatValue
intValue
longValue
parseXxx
getXxx
toString
toHexString
SECTION9:THECOLLECTIONSFRAMEWORK
Makeappropriateselectionofcollectionclasses/interfacestosuitspecifiedbehaviorrequirements.
Distinguishbetweencorrectandincorrectimplementationsofhashcodemethods.
查看上一页
返回分类首页 返回96PC首页
查看下一页 |