多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

AnInterface is an interface.   AnAdapter0 is a non-abstract, non-final class with a zero argument constructor.   AnAdapter1 is a non-abstract, non-final class without a zero argument constructor, but with a constructor that  takes one int argument.   Which two construct an anonymous inner class? ()

  • A、 AnAdapter1 aa=new AnAdapter1(){}
  • B、AnAdapter0 aa=new AnAdapter0(){}
  • C、 AnAdapter0 aa=new AnAdapter0(5){}
  • D、 AnAdapter1 aa=new AnAdapter1(5){}
  • E、AnInterface a1=new AnInterface(5){}
正确答案:B,D
答案解析:
进入题库查看解析

微信扫一扫手机做题