black

SCJP程序员认证考试

登录

单项选择题

You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?()  

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

相关考题

单项选择题 publicclassTest{ publicstaticvoidmain(String[]args){ intx=0; assert(x>0):“assertionfailed”; System.out.println(“finished”); } } Whatistheresult?()

单项选择题 classSuper{publicintgetLenght(){return4;}}publicclassSubextendsSuper{publiclonggetLenght(){return5;}publicstaticvoidmain(String[]args){Supersooper=newSuper();Subsub=newSub();System.out.println(sooper.getLenght()+“,”+sub.getLenght());}}Whatistheoutput?()

单项选择题 public void test(int x) {  int odd = x%2;  if (odd) {   System.out.println(“odd);  } else {  System.out.println(“even”);  }  }  Which statement is true?()

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

备案号:湘ICP备2022003000号-2