black

SCJP程序员认证考试

登录

单项选择题

You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?()  

A. public
B. private
C. protected
D. transient
E. default access

相关考题

单项选择题 int i = 1,j = 10;  do {  if(i>j) {  break;  } j--;  } while (++i <5);  System.out.println(“i =” +i+” and j = “+j); What is the result?()

多项选择题 class A {  A() { }  }  class B extends A {  }  Which two statements are true?()

单项选择题 interface Animal {  void soundOff();  }  class Elephant implements Animal {  public void soundOff() {  System.out.println(“Trumpet”);  }  }  class Lion implements Animal {  public void soundOff() { System.out.println(“Roar”);  }  }  class Alpha1 {  static Animal get( String choice ) {  if ( choice.equalsIgnoreCase( “meat eater” )) {  return new Lion();  } else {  return new Elephant();  }  }  }  Which compiles?()

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2