未分类题

AnInterfaceisaninterface.AnAdapter0isanon-abstract,non-finalclasswithazeroargumentconstructor.AnAdapterlisanon-abstract,non-finalclasswithoutazeroargumentconstructor,butwithaconstructorthattakesoneintargument.Whichtwoconstructananonymousinnerclass()?
A.AnAdapter1aa=newAnAdapter1(){}
B.AnAdapter0aa=newAnAdapter0(){}
C.AnAdapter0aa=newAnAdapter0(5){}
D.AnAdapter1aa=newAnAdapter1(5){}
E.AnInterfaceai=newAnlnterface(5)){}

A.AnAdapter0isanon-abstract,non-finalclasswithazeroargumentconstructor.AnAdapterlisanon-abstract,non-finalclasswithoutazeroargumentconstructor,butwithaconstructorthattakesoneintargument.Whichtwoconstructananonymousinnerclass()?
A.AnAdapter1aa=newAnAdapter1(){}
B.AnAdapter0aa=newAnAdapter0(){}
C.AnAdapter0aa=newAnAdapter0(5){}
D.AnAdapter1aa=newAnAdapter1(5){}
E.AnInterfaceai=newAnlnterface(5)){}

【参考答案】

B, D