网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
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


参考答案

更多 “ 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.staticB.finalC.constD.abstract ” 相关考题
考题 A class design requires that a member variable should be accessible only by same package, which modifer word should be used? A.protectedB.publicC.no modiferD.private

考题 You are creating a class that performs complex financial calculations.The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.You write serialized representations of the class.You need to write a code segment that updates the currRate variable with the current interest ratewhen an instance of the class is deserialized.Which code segment should you use?()A.B.C.D.

考题 You create a Web site that is for members only. The Web site allows members to create lists of users that have access to information about member profiles. The name of the list is stored in the listName variable. The user name of the user to whom access is given is stored in the username variable.You need to enable members to manage their lists of users.Which code segment should you use?()A.B.C.D.

考题 Given:What can directly access and change the value of the variable name?() A. any classB. only the Target classC. any class in the test packageD. any class that extends Target

考题 Given:Which statement is true about the class of an object that can reference the variable base? () A.It can be any class.B.No class has access to base.C.The class must belong to the geometry package.D.The class must be a subclass of the class Hypotenuse.

考题 ______ is the address of a variable or a variable in which the address of another variable is stored.A.DirectorB.PointersystemC.ArrayD.Record

考题 ______is the address of.a variable or a variable in which the address of another variable is stored.A.DirectorB.PointerC.ArrayD.Record

考题 For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()A、jsp:declarationint count = 0;jsp:declarationB、%! int count = 0; %C、jsp:declaration.instanceint count = 0;. jsp:declaration.instanceD、jsp:scriptlet.declarationint count = 0;. jsp:scriptlet.declaration

考题 package test; class Target{ public String name="hello"; } What can directly access and change the value of the variable name?()A、any classB、only the Target classC、any class in the test packageD、any class that extends Target

考题 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;

考题 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.

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

考题 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.

考题 package geometry;  public class Hypotenuse {  public InnerTriangle it = new InnerTriangle();  class InnerTriangle {  public int base;  public int height;  }  }  Which is true about the class of an object that can reference the variable base? ()A、 It can be any class.B、 No class has access to base.C、 The class must belong to the geometry package.D、 The class must be a subclass of the class Hypotenuse.

考题 Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?() A、 The declaration on line 2 does not allocate memory space for the variable myVect.B、 The declaration on line 2 allocates memory space for a reference to a Vector object.C、 The statement on line 2 creates an object of class Vector.D、 The statement on line 3 creates an object of class Vector.E、 The statement on line 3 allocates memory space for an object of class Vector.

考题 A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in athread-safe manner. Which two can support this design goal?()A、Store the data in a local variable.B、Store the data in an instance variable.C、Store the data in the HttpSession object.D、Store the data in the ServletContext object.E、Store the data in the ServletRequest object.

考题 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、 publicB、 no modifierC、 protectedD、 private

考题 Which of the following statements about declaration are true?()         A、 Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.B、 Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.C、 Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.D、 Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.

考题 单选题package geometry;  public class Hypotenuse {  public InnerTriangle it = new InnerTriangle();  class InnerTriangle {  public int base;  public int height;  }  }  Which is true about the class of an object that can reference the variable base? ()A  It can be any class.B  No class has access to base.C  The class must belong to the geometry package.D  The class must be a subclass of the class Hypotenuse.

考题 单选题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  publicB  no modifierC  protectedD  private

考题 多选题Which statements concerning the value of a member variable are true, when no explicit assignments have been made?()AThe value of an int is undetermined.BThe value of all numeric types is zero.CThe compiler may issue an error if the variable is used before it is initialized.DThe value of a String variable is  (empty string).EThe value of all object variables is null.

考题 多选题Which of the following statements about declaration are true?()ADeclaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.BDeclaration of primitive types such as boolean, byte and so on allocates memory space for the variable.CDeclaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.DDeclaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.

考题 多选题Given the following code fragment:     public void create() {     Vector myVect;     myVect = new Vector();      }  Which of the following statements are true?()AThe declaration on line 2 does not allocate memory space for the variable myVect.BThe declaration on line 2 allocates memory space for a reference to a Vector object.CThe statement on line 2 creates an object of class Vector.DThe statement on line 3 creates an object of class Vector.EThe statement on line 3 allocates memory space for an object of class Vector.

考题 单选题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 Company.com developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner.  Which two can support this design goal?()AStore the data in a local variable.BStore the data in an instance variable.CStore the data in the HttpSession object.DStore the data in the ServletContext object.EStore the data in the ServletRequest object.

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

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