black

SCJP程序员认证考试

登录

多项选择题

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){}

相关考题

单项选择题 1. class A {  2. public byte getNumber ()  {  3.   return 1;  4.   }  5. }  6.    7. class B extends A {  8. public short getNumber()  {  9.  return 2;  10. }  11.    12. public static void main (String args[]) {   13.    B  b = new B ();  14.      System.out.printIn(b.getNumber())     15.   }  16. }    What is the result?()

单项选择题 Whichstatementaboutstaticinnerclassesistrue?()

多项选择题 class BaseClass{  private float x= 1.0f;  protected void setVar (float f) {x = f;}  } class SubClass extends BaseClass   {  private float x = 2.0f;  //insert code here 16. }   Which two are valid examples of method overriding?()

All Rights Reserved 版权所有©建筑考试题库(jzkao.com)

备案号:湘ICP备2020024380号-3