单项选择题
What is the result?()
A.81
B.82
C.91
D.92
E.Compilation fails.
F.An exception is thrown at runtime.
相关考题
-
多项选择题
AteamofprogrammersisreviewingaproposedAPIforanewutilityclass.Aftersomediscussion,theyrealizethattheycanreducethenumberofmethodsintheAPIwithoutlosinganyfunctionality.Iftheyimplementthenewdesign,whichtwoprincipleswilltheybepromoting?()
A.Looser coupling
B.Tighter coupling
C.Lower cohesion
D.Higher cohesion
E.Weaker encapsulation
F.Stronger encapsulation -
单项选择题
WhichManclassproperlyrepresentstherelationship"ManhasabestfriendwhoisaDog"?()
A.class Man extends Dog{}
B.class Man implements Dog{}
C.class Man{private BestFriend dog;}
D.class Man{private Dog bestFriend;}
E.class Man{private Dog;}
F.class Man{private BestFriend;} -
多项选择题
Which two, independently, will allow Sub to compile?()
A.Change line 2 to:public int a;
B.Change line 2 to:protected int a;
C.Change line 13 to:public Sub(){this(5);}
D.Change line 13 to:public Sub(){super(5);}
E.Change line 13 to:public Sub(){super(a);}
