Which statements concerning the value of a member variable a

题目
多选题
Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()
A

The value of an int is undetermined.

B

The value of all numeric types is zero.

C

The compiler may issue an error if the variable is used before it is initialized.

D

The value of a String variable is  (empty string).

E

The value of all object variables is null.

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

第1题:

Given:Which two statements are true about the result if the default locale is Locale.US?()

A.The value of b is 2.

B.The value of a is 3.14.

C.The value of b is 2.00.

D.The value of a is 3.141.

E.The value of a is 3.1415.

F.The value of a is 3.1416.

G.The value of b is 2.0000.


参考答案:C, F

第2题:

Sometimes it is desirable to connect a member both by riveting and welding. Which statement is TRUE concerning this procedure?

A.Tearing through the member is more likely in this type connection

B.The weld may be broken by the stresses caused by riveting

C.The weld increases the tensile stress on the rivet heads

D.The welding must be completed before the riveting commences


正确答案: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题:

Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()  

  • A、The value of an int is undetermined.
  • B、The value of all numeric types is zero.
  • C、The compiler may issue an error if the variable is used before it is initialized.
  • D、The value of a String variable is "" (empty string).
  • E、The value of all object variables is null.

正确答案:B,E

第5题:

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

第6题:

Which of the following statements describe the use of the keyword

static?

a) Within the body of a function: A static variable maintains its value

between function revocations

b) Within a module: A static variable is accessible by all functions

within that module

c) Within a module: A static function can only be called by other

functions within that module


正确答案:
 

第7题:

Which statements concerning the switch construct are true?()  

  • A、All switch statements must have a default label.
  • B、There must be exactly one label for each code segment in a switch statement.
  • C、The keyword continue can never occur within the body of a switch statement.
  • D、No case label may follow a default label within a single switch statement.
  • E、A character literal can be used as a value for a case label.

正确答案:E

第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题:

A public member vairable called MAX_LENGTH which is int type, the value of the variable remains constant value 100. Use a short statement to define the variable.()   

  • A、 public int MAX_LENGTH=100;
  • B、 final int MAX_LENGTH=100;
  • C、 final public int MAX_LENGTH=100;
  • D、 public final int MAX_LENGTH=100;

正确答案:D

第10题:

Several @functions can execute multiple statements. Which one of the following initializes a variable and can increment in during the operation?()

  • A、 @do 
  • B、 @for 
  • C、 @while 
  • D、 @dowhile 

正确答案:B

更多相关问题