单选题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.


相似考题
更多“单选题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 i”相关问题
  • 第1题:

    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

  • 第2题:

    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

  • 第3题:

    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.

    正确答案:E

  • 第4题:

    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

  • 第5题:

    A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access control?()    

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

    正确答案:D

  • 第6题:

    You want to restrict access to a role based on the client machine from which the user is accessing the network.Which two role restrictions accomplish this goal? ()

    • A、user name
    • B、password length
    • C、certificate
    • D、Host Checker

    正确答案:C,D

  • 第7题:

    单选题
    A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access control?()
    A

     public

    B

     no modifier

    C

     protected

    D

     private


    正确答案: A
    解析: 这个在前面也有叙述,java有四种访问类型,分别为:public,protected,default,private,其中public变量可以被所有的外部类访问,而pretected的可以被同一个包及该类的子类访问,default即没有任何修饰符的变量可以被同一个包中的类访问,而private变量只能在被该类内部被访问。题目中的外部类应该理解为除该类自身的所有其它类,因此只有使用private可以达到要求 

  • 第8题:

    单选题
    You wish to limit telnet access into your Cisco router to only a single host. In order to accomplish this, access list 1 has been written to allow host 172.16.1.224 access to the router vty lines. What command would assign this access- list to the Virtual Terminal Lines?()
    A

    router(config-line)# ip access-group 1 in

    B

    router(config-line)# access-class 1 in

    C

    router(config-line)# ip access-list 1 in

    D

    router(config-line)# access-line 1 in


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    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


    正确答案: D
    解析: 暂无解析

  • 第10题:

    单选题
    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


    正确答案: C
    解析: 暂无解析

  • 第11题:

    多选题
    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.


    正确答案: A,B
    解析: 暂无解析

  • 第12题:

    单选题
    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
    解析: 暂无解析

  • 第13题:

    不是修饰符的是()

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

    正确答案:D

  • 第14题:

    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

  • 第15题:

    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

  • 第16题:

    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

  • 第17题:

    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

  • 第18题:

    单选题
    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


    正确答案: A
    解析: 暂无解析

  • 第19题:

    单选题
    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


    正确答案: D
    解析: 暂无解析

  • 第20题:

    单选题
    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


    正确答案: E
    解析: 暂无解析

  • 第21题:

    单选题
    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


    正确答案: C
    解析: 一个类中定义的成员变量只能被同一包中的类访问。

  • 第22题:

    单选题
    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


    正确答案: E
    解析: 暂无解析

  • 第23题:

    单选题
    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.


    正确答案: E
    解析: 暂无解析

  • 第24题:

    单选题
    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.


    正确答案: E
    解析: 暂无解析