A.Food, education and automobiles.
B.Education, entertainment and marriage.
C.Food, automobiles and entertainment.
D.Education, automobiles and entertainment.
第1题
A.Bazhasthevalueof0
B.Bazhasthevalueof1
C.Bazhasthevalueof2
D.Anexceptionisthrown.
E.Thecodewillnotcompile.
第2题
A.Bazhasthevalueof0
B.Bazhasthevalueof1
C.Bazhasthevalueof2
D.Anexceptionisthrown.
E.Thecodewillnotcompile.
第3题
A.Compilationsucceeds.
B.Anerroratline2causescompilationtofail.
C.Anerroratline9causescompilationtofail.
D.Anerroratline10causescompilationtofail.
E.Anerroratline11causescompilationtofail.
第4题
10.interfaceFoo{
11.intbar();
12.}
13.
14.publicclassBeta{
15.
16.classAimplementsFoo{
17.publicintbar(){return1;}
18.}
19.
20.publicintfubar(Foofoo){returnfoo.bar();}
21.
22.publicvoidtestFoo(){
23.
24.classAimplementsFoo{
25.publicintbar(){return2;}
26.}
27.
28.System.out.println(fubar(newA()));
29.}
30.
31.publicstaticvoidmain(String[]argv){
32.newBeta().testFoo();
33.}
34.}
Whichthreestatementsaretrue?()
第5题
A.Directiond=NORTH;
B.Nav.Directiond=NORTH;
C.Directiond=Direction.NORTH;
D.Nav.Directiond=Nav.Direction.NORTH;
第6题
A.Compilationfails.
B.Anexceptionisthrownatruntime.
C.doStuffx=6mainx=6
D.doStuffx=5mainx=5
E.doStuffx=5mainx=6
F.doStuffx=6mainx=5
第7题
A.Compilationfailsduetoanerrorinline23.
B.Compilationfailsduetoanerrorinline29.
C.AClassCastExceptionoccursinline29.
D.AClassCastExceptionoccursinline31.
E.Thevalueofallfourobjectsprintsinnaturalorder.
第8题
A.ThetimetofindthevaluefromHashMapwithaPersonkeydependsonthesizeofthemap.
B.DeletingaPersonkeyfromaHashMapwilldeleteallmapentriesforallkeysoftypePerson.
C.InsertingasecondPersonobjectintoaHashSetwillcausethefirstPersonobjecttoberemovedasaduplicate.
D.ThetimetodeterminewhetheraPersonobjectiscontainedinaHashSetisconstantanddoesNOTdependonthesizeofthemap.
第9题
A.Yenreturnscorrectvalues.
B.Euroreturnscorrectvalues.
C.Anexceptionisthrownatruntime.
D.YenandEurobothreturncorrectvalues.
E.Compilationfailsbecauseofanerroratline25.
F.Compilationfailsbecauseofanerroratline30.
第10题
A.Theclassisfullyencapsulated.
B.Thecodedemonstratespolymorphism.
C.TheownerNamevariablebreaksencapsulation.
D.ThecardlDandlimitvariablesbreakpolymorphism.
E.ThesetCardlnformationmethodbreaksencapsulation.
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!