When ‘Final’ is used in class, method and property, what dose itmean?
When ‘Final’ is used in class, method and property, what dose it
mean?
相关考题:
Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo()method, which two statements are true?() A.The class implements java.lang.Comparable.B.The class implements java.util.Comparator.C.The interface used to implement sorting allows this class to define only one sort sequence.D.The interface used to implement sorting allows this class to define many different sort sequences.
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. The application that you are developing provides an interface for administrators and an interface for users to create message reports.You want to ensure that all user messages stored in the MyQueue object are removed when an administrator selects the reset option.What should you do?()A、 Use the Enqueue method of the MyQueue object.B、 Use the Clear method of the MyQueue object.C、 Use the Dequeue method of the MyQueue object.D、 Use the TrimToSize method of the MyQueue object.
A cluster administrator has defined a custom error notification method that will email and administrator when a temp error is detected on an individual hdisk. What method should be used to test this functionality?() A、 sendmail -biB、 yes /dev/kmemC、 emulate errlog entryD、 reducevg vgname hdisk#
When compressing data with the DeflateStream class, how do you specify a stream into which to write compressed data?()A、 Set the BaseStream property with the destination stream, and set the CompressionMode property to Compression.B、 Specify the stream to write into the DeflateStream object is created (for example, in the constructor).C、 Use the Write method of the DeflateStream class.D、 Register for the BaseSream event of the DeflateStream class.
Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()A、The class implements java.lang.Comparable.B、The class implements java.util.Comparator.C、The interface used to implement sorting allows this class to define only one sort sequence.D、The interface used to implement sorting allows this class to define many different sort sequences.
Which three statements are true?()A、A final method in class X can be abstract if and only if X is abstract.B、A protected method in class X can be overridden by any subclass of X.C、A private static method can be called only within other static methods in class X.D、A non-static public final method in class X can be overridden in any subclass of X.E、A public static method in class X can be called by a subclass of X without explicitly referencing the class X.F、A method with the same signature as a private final method in class X can be implemented in a subclass of X.G、A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.
Which two statements are true about the hashCode method?()A、The hashCode method for a given class can be used to test for object equality and object inequality for that class.B、The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.C、The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.D、The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.E、The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.
You use Reflection to obtain information about a method named MyMethod.You need to ascertain whether MyMethod is accessible to a derived class.What should you do?()A、Call the IsAssembly property of the MethodInfo class.B、Call the IsVirtual property of the MethodInfo class.C、Call the IsStatic property of the MethodInfo class.D、Call the IsFamily property of the MethodInfo class.
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. You decide to enable session state for the application. You need to determine whether the sessionID is maintained in the URL of the request. What should you do?()A、The RequestType property of the HttpRequest class should be accessed.B、The IsCookieless property of the HttpSessionState class should be accessed.C、The UrlDecode method of the HttpServerUtility class should be accessed.D、The UrlEncode method of the HttpServerUtility class should be accessed.
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a property named ServiceContext to a control. You need the value of ServiceContext to flow to the child controls exactly like the value of the DataContext property of the FrameworkElement class. What should you do? ()A、Inherit the control class from the DependencyObject class.B、Register a dependency property.In the options settings of the property metadata, specify the Inherits option.C、Declare a new property. In the get and set methods of the new property, create an instance of the TraversalRequest class.D、Declare a new property. In the get method of the new property call VisualTreeHelper.GetParent. In the set method of the new property, call VisualTreeHelper.GetChild.
Which property of the ListView class is used to get/set the name of the data field whose value exclusively identifes every data row of a ListView when the ClientIDMode property is set to Predictable?()A、LoadViewStateByIDB、UniqueIDC、ClientIDModeD、ClientIDRowSuffix
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 implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values. The Models folder contains a class named Player with the following definition.Public Class Player Public Property Name As String Public Property LastScore As IntegerPublic Property HighScore As IntegerEnd Class You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. What should you do?()A、Rename Score.ascx to LastScore.ascx.B、Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/Player/DisplayTemplates folder.C、Add the following attribute to the LastScore property. UIHint("Score")D、Add the following attribute to the LastScore property. Display(Name:="LastScore", ShortName:="Score")
You work as an application developer at Certkiller .com. You are developing a collection class named ClientCollection, which is to be used for storing the names of Certkiller .com’s clients that are situated in various geographical areas. These client names are represented by the Client class. You are planning to create a method named SortClients in the ClientCollection class to arrange Client objects in ascending order. You need to ensure that the appropriate interface is implemented by the Client class to allow sorting.What interface should be used?()A、 IDictionaryB、 IComparableC、 IComparerD、 IEqualityComparer
You are developing an application that will perform mathematical calculations.You need to ensure that the application is able to perform multiple calculations simultaneously. What should you do?()A、Set the IdealProcessor property of the ProcessThread object.B、Set the ProcessorAffinity property of the ProcessThread object.C、For each calculation, call the QueueUserWorkItem method of the ThreadPool class.D、Set the Process.GetCurrentProcess().BasePriority property to High.
You work as a Web Developer at Certkiller.com. You use Microsoft ASP.NET 3.5 to create a Webapplication. A Hypertext Transfer Protocol (HTTP) handler is implemented to produce Human Interactive Proof(HIP) images. You have to make sure that the current page invoke the handler and automaticallycontinue executing after the handler completes execution. What should you do?()A、You should consider setting the RedirectLocation property of the HttpResponse class.B、You should consider calling the Redirect method of the HttpResponse class.C、You should consider calling the Execute method of the HttpServerUtility class.D、You should consider calling the Transfer method of the HttpServerUtility class.
Which of the following statements about variables and their scopes are true? () A、 Instance variables are member variables of a class.B、 Instance variables are declared with the static keyword.C、 Local variables defined inside a method are created when the method is executed.D、 Local variables must be initialized before they are used.
You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform.You have recently finished development of a class named TestReward and package the class in a .NET 2.0 assembly named TestObj.dll. After you ship the assembly and it is used by client applications, you decide to move the TestReward class from TestObj.dll assembly to the TestRewardObj.dll Assembly. You are to ensure when you ship the updated TestObj.dll and TestRewardObj.dll assemblies that the client applications continue to work and do not require recompiling.What should you do?()A、 The TypeForwardedTo attribute should be usedB、 The TypeConvertor.ConvertTo method should be usedC、 The InternalsVisibleTo attribute should be usedD、 The Type Convertor.ConvertFrom method should be used
单选题You develop a service application named PollingService that periodically calls long-running procedures.These procedures are called from the DoWork method.You use the following service application code: When you attempt to start the service, you receive the following error message: Could not start the PollingService service on the local computer.Error 1053: The service did not respond to the start or control request in a timely fashion. You need to modify the service application code so that the service starts properly.What should you do?()A Move the loop code into the constructor of the service class from the OnStart method.B Drag a timer component onto the design surface of the service. Move the calls to the long-running procedure from the OnStart method into the Tick event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.C Add a class-level System.Timers.Timer variable to the service class code. Move the call to the DoWork method into the Elapsed event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.D Move the loop code from the OnStart method into the DoWork method.
单选题A cluster administrator has defined a custom error notification method that will email and administrator when a temp error is detected on an individual hdisk. What method should be used to test this functionality?()A sendmail -biB yes /dev/kmemC emulate errlog entryD reducevg vgname hdisk#
单选题When compressing data with the DeflateStream class, how do you specify a stream into which to write compressed data?()A Set the BaseStream property with the destination stream, and set the CompressionMode property to Compression.B Specify the stream to write into the DeflateStream object is created (for example, in the constructor).C Use the Write method of the DeflateStream class.D Register for the BaseSream event of the DeflateStream class.
单选题You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a window that contains a Button control and a MenuItem control. Both controls are labeled "Add sugar." The Command properties of the Button and MenuItem controls are set to the same RoutedCommand named AddSugarCommand. You write the following code segment. private void CanAddSugar (object sender, CanExecuteRoutedEventArgs e) { ... } You need to ensure that when the CanAddSugar method sets e.CanExecute to false, the MenuItem and Button controls are disabled. What should you do?()ACreate an event handler for the CanExecuteChanged event of the AddSugarCommand command.Call the CanAddSugar method from within the event handler.BInherit the AddSugarCommand from the RoutedUICommand class instead of the RoutedCommand class. Call the CanAddSugar method from within the constructor of the AddSugarCommand command.CAdd a CommandBinding object to the CommandBinding property of the MenuItem control. Set the CanExecute property of the CommandBinding object to the CanAddSugar method.DAdd a CommandBinding object to the CommandBindings property of the window. Set the Command property of CommandBinding to the AddSugarCommand command. Set the CanExecute property of the CommandBinding object to the CanAddSugar method.
单选题What teaching method is used by the teacher if much of his/her class time is spent on drilling sentence patterns followed by exercises like repetition, memorization, mimicry, etc?AThe Natural Approach.BThe Communicative Approach.CThe Audio-lingual Method.DThe Grammar-translation Method.
单选题You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. You decide to enable session state for the application. You need to determine whether the sessionID is maintained in the URL of the request. What should you do?()AThe RequestType property of the HttpRequest class should be accessed.BThe IsCookieless property of the HttpSessionState class should be accessed.CThe UrlDecode method of the HttpServerUtility class should be accessed.DThe UrlEncode method of the HttpServerUtility class should be accessed.
多选题Which two statements are true about the hashCode method?()AThe hashCode method for a given class can be used to test for object equality and object inequality for that class.BThe hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.DThe only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.EThe hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.