填空题Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.()

填空题
Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.()

参考解析

解析: 暂无解析

相关考题:

You need to write a code segment that transfers the contents of a byte array named dataToSendby using a NetworkStream object named netStream.You need to use a cache of size 8,192 bytes.Which code segment should you use?()A.B.C.D.

You are writing a method that accepts a string parameter named message.Your method must break the message parameter into individual lines of text and pass each line to a second method named Process.Which code segment should you use?()A.B.C.D.

You need to write a code segment that transfers the first 80 bytes from a stream variable named stream1 into a new byte array named byteArray.You also need to ensure that the code segment assigns the number of bytes that are transferred to an integer variable named bytesTransferred.Which code segment should you use?()A.bytesTransferred=stream1.Read(byteArray,0,80);B.C.D.

You need to read the entire contents of a file named Message.txt into a single string variable.Which code segment should you use?() A.B.C.D.

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.

A Windows Communication Foundation (WCF) client application is consuming an RSS syndication feed from a blog.You have a SyndicationFeed variable named feed. The application iterates through the items as follows.(Line numbers are included for reference only.)01 foreach (SyndicationItem item in feed.Items)02 {03 }You need to display the content type and body of every syndication item to the console.Which two lines of code should ou insert between lines 02 and 03?()A.B.C.D.

A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.)01 static void Main(string[] args)02 {03 ServiceHost host;04 ...05 host.Open();06 Console.ReadLine();07 host.Close();08 }You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()A. host = new ServiceHost(MyApplication.DataAccessService);B. host = new ServiceHost(MyApplication.DataAccess);C. host = new ServiceHost(typeof(IDataAccess));D. host = new ServiceHost(typeof(DataAccessService));

Given:Under which three circumstances will the code on line 37 be executed?() A.The instance gets garbage collected.B.The code on line 33 throws an exception.C.The code on line 35 throws an exception.D.The code on line 31 throws an exception.E.The code on line 33 executes successfully.

Given:Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ?() A.move the line 12 print statement into the foo() methodB.change line 7 to public synchronized void go() {C.change the variable declaration on line 2 to private volatile int x;D.wrap the code inside the foo() method with a synchronized( this ) blockE.wrap the for loop code inside the go() method with a synchronized block synchronized(this){ //for loop code here }

Embedded systems always require the user to manipulate bits inregisters or variables. Given an integer variable a, write two code fragments.The first should set bit 5 of a. The second shnuld clear bit 5 of a. In bothcases, the remaining bits should be unmodified.

31. // some code here  32. try {  33. // some code here  34. } catch (SomeException se) {  35. // some code here  36. } finally {  37. // some code here  38. }  Under which three circumstances will the code on line 37 be executed?()A、 The instance gets garbage collected.B、 The code on line 33 throws an exception.C、 The code on line 35 throws an exception.D、 The code on line 31 throws an exception.E、 The code on line 33 executes successfully.

Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.()

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 Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.) 01 static void Main(string[] args) 02 { 03 ServiceHost host; 04 ... 05 host.Open( ); 06 Console.ReadLine( ); 07 host.Close( ); 08 } You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()A、host = new ServiceHost("MyApplication.DataAccessService");B、host = new ServiceHost("MyApplication.DataAccess");C、host = new ServiceHost(typeof(IDataAccess));D、host = new ServiceHost(typeof(DataAccessService));

You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. Which two actions should you perform?()A、Add the following line of code to the TestUserControl.ascx.cs code-behind file. public string CityName { get { return "New York"; } } B、Add the following line of code to the TestUserControl.ascx.cs code-behind file. protected readonly string CityName = "New York"; C、Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.CityName; } D、Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.Attributes["CityName"]; }

You work as an application developer at Certkiller .com. Certkiller .com has instructed you to create a class named MetricFormula. This class will be used to compare MetricUnit and EnglishUnit objects.The MetricFormula is currently defined as follows (Line numbers are used for reference purposes only): 1. public class MetricFormula2. { 3. 4. } You need to ensure that the MetricFormula class can be used to compare the required objects. What should you do? ()A、 Add the following code on line 1: : IComparable {B、 Add the following code on line 1: : IComparer {C、 Add the following code on line 3: public int Compare (object x, object y) {// implementation code }D、 Add the following code on line 3: public int CompareTo (object obj) {// implementation code }

You define the following regular expression of currency values: regex tx = new regex("^-?/d+(/./d{2})?$") You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use. What should you do?()A、The tx.Matches(Bill)B、The tx.Equals(Bill)C、The tx.Match(Bill)D、The tx.IsMatch(Bill)

单选题You are developing an application that dynamically loads assemblies from an application directory. You need to write a code segment that loads an assembly named Company1.dll into the current application domain. Which code segment should you use?()A AB BC CD D

单选题The spokeswoman of our government declares that our foreign policy is _____ the interests of the peace-loving people of the world.Ain line forBin line withCin point ofDin view of

多选题31. // some code here  32. try {  33. // some code here  34. } catch (SomeException se) {  35. // some code here  36. } finally {  37. // some code here  38. }  Under which three circumstances will the code on line 37 be executed?()AThe instance gets garbage collected.BThe code on line 33 throws an exception.CThe code on line 35 throws an exception.DThe code on line 31 throws an exception.EThe code on line 33 executes successfully.

单选题Which signal is detected as originating from a SART?()AThe Morse code distress series S-O-S repeated 3 times followed by DE and the vessel's call signBA line of blip code on a radar screen outward from the SART's position along its line of bearingCA line of blip code on a radar screen inward from the SART's position to its own ship along its line of bearingDNone of these

单选题You define the following regular expression of currency values: regex tx = new regex("^-?/d+(/./d{2})?$") You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use. What should you do?()AThe tx.Matches(Bill)BThe tx.Equals(Bill)CThe tx.Match(Bill)DThe tx.IsMatch(Bill)

单选题Certkiller.com has hired you as a system administrator for their network. You make use of .NETFramework v3.5 in order to create a Microsoft ASP.NET application.  You decide to create a Web form. You add the subsequent code fragment to the Web form. ’ /   The DataSource control named CKDataSource recovers the Quantity column values from a tablenamed Orders. You the create the rptData_ItemDataBound event handler using the subsequentcode fragment. (The line numbers is included for reference purposes)  1 protected void rept_b(object sender, RepeaterItemEventArgs e) 2 { 3 4 if(CKLbl != null) 5 if(int.Parse(CKLbl.Text)  10)6 CKLbl.ForeColor = Color.Red;7 }  You receive an instruction from management to recover a reference to the lblQuantity Labelcontrol into a variable. The variable is named CKLbl.  What should you do?()AYour best option would be to insert Label CKLbl = e.Item.FindControl(lblQty) as Label at line4.BYour best option would be to insert Label CKLbl = Page.FindControl(lblQty) as Label at line 4.CYour best option would be to insert Label CKLbl = rptData.FindControl(lblQty) as Label at line4.DYour best option would be to insert Label CKLbl = e.Item.Parent.FindControl(lblQty) as Labelat line 4

填空题Given the following code, write a line of code that, when inserted at the indicated location, will make the overriding method in Extension invoke the overridden method in class Base on the current object.   class Base {   public void print( ) {   System.out.println("base");   }   }   class Extention extends Base {   public void print( ) {   System.out.println("extension");   // insert line of implementation here   }   }   public class Q294d {   public static void main(String args[]) {   Extention ext = new Extention( );   ext.print( );   }   }   Fill in a single line of implementation.()

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form and add the following code fragment:         ’ /         The SqlDataSource1 DataSource control retrieves the Quantity column values from a table named Products.  You write the following code segment to create the rptData_ItemDataBound event handler:   01 protected void rptData_ItemDataBound(object sender,   02   RepeaterItemEventArgs e)   03 {   04 ►  05   if(lbl != null)   06     if(int.Parse(lbl.Text)  10)   07       lbl.ForeColor = Color.Red;   08 } You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 04? ()ALabel lbl = Page.FindControl(lblQuantity) as Label; BLabel lbl = e.Item.FindControl(lblQuantity) as Label; CLabel lbl = rptData.FindControl(lblQuantity) as Label; DLabel lbl = e.Item.Parent.FindControl(lblQuantity) as Label;

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application contains a DataSourceControl named CategoriesDataSource that is bound to a Microsoft SQL Server 2005 table. The CategoryName column is the primary key of the table. You write the following code fragment in a FormView control:   01    02   Category:   03      09      10     You need to ensure that the changes made to the CategoryID field can be written to the database.  Which code fragment should you insert at line 04?()ASelectedValue='%# Eval(CategoryID) %' BSelectedValue='%# Bind(CategoryID) %' CSelectedValue='%# Eval(CategoryName) %' DSelectedValue='%# Bind(CategoryName) %'

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