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
答案解析:有
微信扫一扫手机做题