11.publicenumTitle{12.MR(”Mr.”),MRS(”Mrs.”),MS(”Ms.”);13.privatefinalStringtitle;14.privateTitle(Stringt){title=t;}15.publicStringformat(Stringlast,Stringfirst){16.returntitle++first++last;17.}18.}19.publicstaticvoidmain(String[]args){20.System.out.println(Title.MR.format(”Doe”,John”));21.}Whatistheresult?()
A.Mr.JohnDoe
B.Anexceptionisthrownatruntime.
C.Compilationfailsbecauseofanerrorinline12.
D.Compilationfailsbecauseofanerrorinline15.
E.Compilationfailsbecauseofanerrorinline20.
第1题:
第2题:
第3题:
第4题:
第5题: