Exam:310-035Title:SunCertifiedProgrammerforJava2Platform1
4Ver:04
04Note:SectionAcontains147questions
SectionBcontains147questions
Thetotalnumberofquestionsis294
SectionAQUESTION1Given:1publicclassTest{2publicstaticvoidmain(Stringargs[]){3classFoo{4publicinti=3;5}6Objecto=(Object)newFoo();7Foofoo=(Foo)o;8System
println("i="+foo
i);9}10}Whatistheresult
Compilationfails
AClassCastExceptionisthrownatline6
AClassCastExceptionisthrownatline7
Answer:AQUESTION2Whichtwocauseacompilererror
(Choosetwo)A
float[]=newfloat(3);B
floatf2[]=newfloat[];C
float[]f1=newfloat[3];D
floatf3[]=newfloat[3];E
floatf5[]={1
floatf4[]=newfloat[]{1
0f};Answer:A,BTheF
statementisincorrect
Thefloatnumbersshouldbeseparatedwithcommasandnotdots
QUESTION3Given:1inti=1,j=10;2do{3if