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

Java认证考试

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

It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()  

  • A、Mark the method with the keyword public.
  • B、Mark the method with the keyword protected.
  • C、Mark the method with the keyword private.
  • D、Mark the method with the keyword package.
  • E、Do not mark the method with any accessibility modifiers.
正确答案:E
答案解析:
进入题库查看解析

微信扫一扫手机做题