Java认证考试

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、 PublicB、 PrivateC、 ProtectedD、 TransientE、 No access modifier is

题目

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 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

第2题:

A member variable defined in a class can be accessed only by the classes in the same package. Which modifier should be used to obtain the access control?()         

  • A、 private
  • B、 no modifier
  • C、 public
  • D、 protected

正确答案:B

第3题:

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

第4题:

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

第5题:

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

第6题:

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

第7题:

不是修饰符的是()

  • A、public
  • B、private
  • C、protected
  • D、class

正确答案:D

第8题:

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

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

正确答案:C

第9题:

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

第10题:

Which two demonstrate encapsulation of data?()  

  • A、 Member data have no access modifiers.
  • B、 Member data can be modified directly.
  • C、 The access modifier for methods is protected.
  • D、 The access modifier to member data is private.
  • E、 Methods provide for access and modification of data.

正确答案:D,E

更多相关问题