单选题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 PublicB PrivateC ProtectedD TransientE No access modifier is required

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


参考解析

解析: 暂无解析

相关考题:

阅读下列代码段,选出该代码段的正确文件名( )。 class A { void method1() { System.out.println("method1 in class A"); } } public class B { void method2() { System.out.println("method2 in class B"); } public static void main(String args[]) { System.out.println("main in class B"); } }A.A.javaB.A.classC.B.classD.B.java

You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.)01 [ServiceContract()]02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]03 public Class LibraryService04 {05 public Book GetBookByTitle(string title)06 {07 ...08 }0910 [WebGet(UriTemplate = Book/{id})]11 public Book GetBookById(string id)12 {13 ...14 }15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()A. [WebGet(UriTemplate = Book/{title})]B. [WebGet(UriTemplate = BookByTitle/{title})]C. [WebGet(UriTemplate = Book/{titleToSearch})]D. [WebGet(UriTemplate = {titleToSearch})]

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 outB、ip access-group 101 outC、apply access-list 101 outD、access-class 101 outE、ip access-list e0 out

public class CreditCard {  private String cardlD;  private Integer limit;  public String ownerName;  public void setCardlnformation(String cardlD,  String ownerName, 28. Integer limit) {  this.cardlD = cardlD;  this.ownerName = ownerName;  this.limit = limit;  }  } Which is true?() A、 The class is fully encapsulated.B、 The code demonstrates polymorphism.C、 The ownerName variable breaks encapsulation.D、 The cardlD and limit variables break polymorphism.E、 The setCardlnformation method breaks encapsulation.

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、 publicB、 privateC、 protectedD、 transientE、 default access

Given an ActionEvent, which method allows you to identify the affected Component?()  A、 Public class getClass()B、 Public Object getSource()C、 Public Component getSource()D、 Public Component getTarget()E、 Public Component getComponent()F、 Public Component getTargetComponent()

You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?()  A、 publicB、 privateC、 protectedD、 transientE、 default access

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、 PublicB、 PrivateC、 ProtectedD、 TransientE、 No access modifier is required

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

You are creating a job class. You want access to the detailed information for all the runs of each job in the class and every operation performed on every job in the class. Which setting will you use for the LOGGING_LEVEL parameter?()A、 LOGGING_OFFB、 LOGGING_RUNSC、 LOGGING_FULLD、 LOGGING_NULL

You are developing a custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()A、The method must return a type of either IEnumerator or IEnumerable.B、The method must return a type of IComparable.C、The method must explicitly contain a collection.D、The method must be the only iterator in the class.

You are creating an assembly named Assembly1.Assembly1 contains a public method. The global cache contains a second assembly named Assembly2.You must ensure that the public method is only called from Assembly2.Which permission class should you use?()A、GacIdentity PermissionB、Publisher Identity PermissionC、Data Protection PermissionD、Strong Name Identity Permission

You are creating a Windows Forms application by using the .NET Framework 3.5. You plan to develop a new control for the application.The control will have the same properties as a TextBox control.You need to ensure that the control has a transparent background when it is painted on form.You want to achieve this goal by using the minimum amount of development effort.What should you do?()A、Create a new class that is derived from the Control class.Call the SetStyle method in the constructor.B、Create a new class that is derived from theTextBox control class.Override the OnPaint method in the constructor.C、Create a new class that is derived from the Control class.Set the BackColor property of the control to Transparent.Call the SetStyle method in the constructor.D、Create a new class that is derived from theTextBox control class.Set the BackColor property of the control to Transparent in the constructor.Call the SetStyle method in the constructor.

You are a professional level SQL Sever 2008 Database Administrator in an international corporation named Wiikigo. You are experienced in managing databases in an enterprise-level organization, optimizing and sustaining the database life cycle. In the company, your job is to implement solutions on security, troubleshooting, deployment and optimization. A SQL Server 2008 instance is managed by you. The security requirements should be designed for a new database application. A code segment is utilized by the application, and the code segment includes the following components: A method that the registry is accessed on the SQL Server, a method that the file system is accessed on a network file server, and a class definition that public static fields are utilized. SQL CLR integration is utilized by the code segment, and the code segment is implemented as a single assembly. Since you are the technical support, you are required to make sure that the application should be successfully deployed to the instance.    Which action will you perform?()A、The SAFE code access security should be utilized for the assembly.B、All public static fields should be replaced with public fields.C、All public static fields should be utilized with public static read-only fields. And then the assembly shouldbe registered by utilizing the regasm.exe utility before deployment.D、All public static fields should be replaced with public static read-only fields. And then the EXTERNAL_ACCESS code access security should be utilized for the assembly.

You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 03 public Class LibraryService 04 { 05 public Book GetBookByTitle(string title) 06 { 07 ... 08 } 09 10 [WebGet(UriTemplate = "Book/{id}")] 11 public Book GetBookById(string id) 12 { 13 ... 14 } 15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()A、[WebGet(UriTemplate = "Book/{title}")]B、[WebGet(UriTemplate = "BookByTitle/{title}")]C、[WebGet(UriTemplate = "Book/{titleToSearch}")]D、[WebGet(UriTemplate = "{titleToSearch}")]

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

单选题Given an ActionEvent, which method allows you to identify the affected Component?()A Public class getClass()B Public Object getSource()C Public Component getSource()D Public Component getTarget()E Public Component getComponent()F Public Component getTargetComponent()

单选题public class TestSeven extends Thread {  private static int x;  public synchronized void doThings() {  int current = x;  current++;  x = current;  }  public void run() {  doThings();  }  }  Which is true?()A Compilation fails.B An exception is thrown at runtime.C Synchronizing the run() method would make the class thread-safe.D The data in variable “x” are protected from concurrent access problems.E Declaring the doThings() method as static would make the class thread-safe.F Wrapping the statements within doThings() in a synchronized(new Object()) {} block would make the class thread-safe.

单选题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?()AActiveX controls BCalendar Class CStandard Object Library DPicklist Class EWizard Class FNavigator Class

单选题public class CreditCard {  private String cardlD;  private Integer limit;  public String ownerName;  public void setCardlnformation(String cardlD,  String ownerName, 28. Integer limit) {  this.cardlD = cardlD;  this.ownerName = ownerName;  this.limit = limit;  }  } Which is true?()A The class is fully encapsulated.B The code demonstrates polymorphism.C The ownerName variable breaks encapsulation.D The cardlD and limit variables break polymorphism.E The setCardlnformation method breaks encapsulation.

单选题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 PublicB PrivateC ProtectedD TransientE No access modifier is required

单选题You are creating a job class. You want access to the detailed information for all the runs of each job in the class and every operation performed on every job in the class. Which setting will you use for the LOGGING_LEVEL parameter?()A LOGGING_OFFB LOGGING_RUNSC LOGGING_FULLD LOGGING_NULL

单选题You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?()A publicB privateC protectedD transientE default access

单选题You work as an application developer at Certkiller .com. You are developing an application that makes use of a Queue class object named MyQueue. This Queue class object will be used to store messages sent by the user during application run time.You would like to access the message at the beginning of the queue, prior to processing the user messages, without removing it. What should you do?()A Use the Enqueue method of the MyQueue object.B Use the Contains method of the MyQueue object.C Use the Dequeue method of the MyQueue object.D Use the Peek method of the MyQueue object.

单选题You are developing a custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()AThe method must return a type of either IEnumerator or IEnumerable.BThe method must return a type of IComparable.CThe method must explicitly contain a collection.DThe method must be the only iterator in the class.

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

单选题You work as an application developer at Certkiller .com. You are currently in the process of creating a class that stores data about Certkiller .com’s customers. Certkiller .com customers are assigned unique identifiers and various characteristics that may include aliases, shipping instructions, and sales comments. These characteristics can change in both size and data type. You start by defining the Customer class as shown below: public class Customer { private int custID; private ArrayList attributes; public int CustomerID { get {return custID;} } public Customer (int CustomerID) { this.custID = CustomerID; this.attributes = new ArrayList (); } public void AddAttribute (object att) {  attributes.Add (att); } } You have to create the FindAttribute method for locating attributes in Customer objects no matter what the data type is.You need to ensure that the FindAttributemethod returns the attribute if found,and you also need to ensure type-safety when returning the attribute.What should you do?()A Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }B Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }C Use the following code to declare the FindAttribute method: public T FindAttribute  (T att) {//Find attribute and return the value }D Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }

单选题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 publicB privateC protectedD transientE default access