CMS专题

单选题You want a class to have access to members of another class in the same package. Which is the most restrictive access modifier that will accomplish that will accomplish this objective?()APublicBPrivateCProtectedDTransientENo access modifier is required

题目
单选题
You want a class to have access to members of another class in the same package. Which is the most restrictive access modifier that will accomplish that will accomplish this objective?()
A

 Public

B

 Private

C

 Protected

D

 Transient

E

 No access modifier is required.

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are securing a network for TestKing and want to apply an ACL (access control list) to an interface of a router. Which one of the following commands would you use?()

  • A、permit access-list 101 out
  • B、ip access-group 101 out
  • C、apply access-list 101 out
  • D、access-class 101 out
  • E、ip access-list e0 out

正确答案:B

第2题:

Which two are benefits of fully encapsulating a class?()  

  • A、 Performance of class methods is improved.
  • B、 Implementation details of the class are hidden.
  • C、 Access modifiers can be omitted on class data members.
  • D、 Code that uses the encapsulation class can access data members directly.
  • E、 Internal operation of the class can be modified without impacting clients of that class.

正确答案:B,E

第3题:

If you want to learn something, you had better pay()in class.

Acare

Brespect

Cattention

Dnotion


C

第4题:

You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?()  

  • A、 public
  • B、 private
  • C、 protected
  • D、 transient
  • E、 default access

正确答案:C

第5题:

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

正确答案:B

第6题:

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

正确答案:E

第7题:

Which statements about static inner classes are true?()

  • A、 A static inner class requires a static initializer.
  • B、 A static inner class requires an instance of the enclosing class.
  • C、 A static inner class has no reference to an instance of the enclosing class.
  • D、 A static inner class has access to the non-static members of the outer class.
  • E、 Static members of a static inner class can be referenced using the class name of the static inner  class.

正确答案:C,E

第8题:

You want subclasses in any package to have access to members of a superclass. Which is the mostrestrictive access modifier that will accomplish this objective?() 

  • A、 Public
  • B、 Private
  • C、 Protected
  • D、 Transient
  • E、 No access modifier is qualified

正确答案:C

第9题:

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

  • A、 Public
  • B、 Private
  • C、 Protected
  • D、 Transient
  • E、 No access modifier is required

正确答案:B

第10题:

You want to provide a tool that allows users quick access to form modules, by listing them in an Explorer-style interface. Which reusable component do you use?()

  • A、ActiveX controls 
  • B、Calendar Class 
  • C、Standard Object Library 
  • D、Picklist Class 
  • E、Wizard Class 
  • F、Navigator Class

正确答案:F

更多相关问题