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

相关考题:

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

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

The overall transfer function is the ratio of the transform. of the controlled variable to the transform. of ( ). A.the controlled variableB.the reference inputC.the feedbackD.the output variable

使用VC6打开考生文件夹下的工程test14_1,此工程包含一个源程序文件test14_1.cpp,但该程序运行有问题,请改正程序中的错误,使该程序的输出结果如下:member1=5member2=5member1=7member2=9源程序文件test14_1.cpp清单如下:include<iostream.h>class My Class{/************** found *****************friend void setMember(MyClass myObj,char meml){myObj.member1=mem1;myObj.member2=mem1;cout<<"member1="<<myObi.member1<<" member2="<<myObj.member2<<endl;}/************** found ***************/void setMember(MyClass myObj,char mem1,char mem2){myObj.member1=mem1;myObj.member2=mem2;cout<<"member1:"<<myObj.member1<<"member2="<<myObj.member2<<endl;}private:char member1;char member2;};void main(){MyClass theObj;/************** found ****************/theObj.setMember(theObj,'5');theObj.setMember(theObj,'7','9');}

A crew member is unconscious and the face is flushed. You should ______.A.lay the crew member down with the head and shoulders slightly raisedB.administer a liquid stimulantC.lay the crew member down with the head lower than the feetD.attempt to stand the crew member upright to restore consciousness

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

VLSM的含义是()。A.Variable Length Subnet MaskingB.Variable Length Shortest MaskingC.Very Long/Shortest MaskingD.Variable Long Subnet Masking

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

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

VLSM的含义是()。A、Variable Length Subnet MaskingB、Variable Length Shortest MaskingC、Very Long/Shortest MaskingD、Variable Long Subnet Masking

VLSM的含义是()A、Variable Length Subnet MaskingB、Variable Length Shortest MaskingC、Very Long/Shortest MaskingD、Variable Long Subnet MaskingE、Variable Length Short Measurement

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.

temp=’this is a temped variable’;echo foo${temp}上述命令执行的结果为()A、fooB、foo$tempC、foo’this is a temped variable’D、foothis is a temped variable

Which substitution variable would you use if you want to reuse the variable without prompting the user each time?()A、B、ACCEPTC、PROMPTD、

单选题An administrator needs to add the /usr/vac/bin directory to their PATH environment variable for the current session.  Which of the following will accomplish this task()Apath=$path:/usr/vac/bin; export pathBpath.=/usr/vac/bin; export $pathCModify the path environment variable in /etc/profileDModify the path environment variable in /.profile

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

单选题The auto-complete feature in the JUNOS CLI is triggered by which method?()Aspace bar for both command and variable completionBspace bar for command completion;tab key for variable completionCspace bar for variable completion;tab key for command completionDtab key for variable and command completion;space bar for command completion

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

单选题() is made of a boss with separated blades mounted into it.AA variable pitch propellerBA variable pitch nutCA fixed pitch parallelDA fixed pitch screw

单选题Which substitution variable would you use if you want to reuse the variable without prompting the user each time?()ABACCEPTCPROMPTD

单选题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? ()ARoles.CreateRole(listName);User.InInRole(listName);BRoles.CreateRole(listName);Roles.AddUserToRole(useName, listName);CRoles.RoleExists(listName);Roles.AddUserToRole(useName, listName);DRoles.RoleExists(listName);User.InInRole(listName);

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

单选题A crew member is unconscious and the face is flushed. You should().Alay the crew member down with the head and shoulders slightly raisedBadminister a liquid stimulantClay the crew member down with the head lower than the feetDattempt to stand the crew member upright to restore consciousness

单选题Who may perform as a lookout().AA member of the engineering watchBA member of the navigational watchCA member of the Stewards DepartmentDAll of the above

单选题What does it mean for a variable in the Application Editor to be defined as a parameter?()AThe variable can be used to pass data to and from subflows.  BThe value for that variable can be supplied via Application Configuration in Application Administration.  CThe value for that variable is defined by the calling application.  DThe variable can be used in conditional steps.  EThe variable can be used to pass data to and from VoiceXML applications.