单选题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  privateB  no modifierC  publicD  protected

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

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

第1题:

Amembervariabledefinedinaclasscanbeaccessedonlybytheclassesinthesamepackage.Whichmodifiershouldbeusedtoobtaintheaccesscontrol?()

A.private

B.nomodifier

C.public

D.protected


参考答案:B
一个类中定义的成员变量只能被同一包中的类访问。

第2题:

Which keyword can protect a class in a package from accessibility by the classes outside the package()。

  • A、private
  • B、protected
  • C、final
  • D、don’t use any keyword at all (make it default)

正确答案:D

第3题:

A class design requires that a member variable should be accessible only by same package, which modifer word should be used?

A.protected

B.public

C.no modifer

D.private


参考答案:C

第4题:

What does it mean for a variable in the Application Editor to be defined as a parameter?()

  • A、The variable can be used to pass data to and from subflows.  
  • B、The value for that variable can be supplied via Application Configuration in Application Administration.  
  • C、The value for that variable is defined by the calling application.  
  • D、The variable can be used in conditional steps.  
  • E、The variable can be used to pass data to and from VoiceXML applications.

正确答案:B

第5题:

Which thefollowingstatements about static inner classes is true?()

  • A、 An anonymous class can be declared as static.
  • B、 A static inner class cannot be a static member of the outer class.
  • C、 A static inner class does not require an instance of the enclosing class.
  • D、 Instance member of a static inner class can be referenced using the class name of the staticinner class.

正确答案:C

第6题:

Which statements concerning the correlation between the inner and outer instances of non-static inner classes are true?()  

  • A、Member variables of the outer instance are always accessible to inner instances, regardless of their      accessibility modifiers.
  • B、Member variables of the outer instance can never be referred to using only the variable name within     the inner instance.
  • C、More than one inner instance can be associated with the same outer instance.
  • D、All variables from the outer instance that should be accessible in the inner instance must be declared     final.
  • E、A class that is declared final cannot have any inner classes.

正确答案:A,C

第7题:

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

第8题:

Which modifer should be applied to a declaration of a class member variable for the value of variable to remain constant after the creation of the object?()

A.static

B.final

C.const

D.abstract


参考答案:B

第9题:

Which two statements are true of login classes?()

  • A、Users can be members of multiple login classes.
  • B、Login classes define authorization parameters for a user.
  • C、There are five system-defined login classes.
  • D、Login class permission flags can be overridden for certain commands.

正确答案:B,D

第10题:

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

更多相关问题