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 serialize an object of type Listint in a binary format.The object is named data.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 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 are developing a new version of an existing message contract named CustomerDetailsVersion1. The new version of the message contract must add a Department field of type String to the SOAP header.You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure that all client applications can consume the service.Which code segment should you use?()A.B.C.D.

Given:Which code, inserted at line 16, correctly retrieves a local instance of a Point object?() A.Point p = Line.getPoint();B.Line.Point p = Line.getPoint();C.Point p = (new Line()).getPoint();D.Line.Point p = (new Line()).getPoint();

In object-oriented(51), objects can be viewed as reusable components, and once the programmer has developed a(52)of these components, he can(53)the amount of new coding required. But(52)a(54)is no simple task because the integrity of the Original software design is critical. Reusability can be a mixed blessing for user, too, as a programmer has to be able to find the object he needs. But if(55)is your aim, reusability is worth the risk.A.programmingB.creatingC.indisposingD.libraryE.maximize

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)

When selecting a Network Interface Card (NIC), which of the following factors need to be considered?() A. The type of application used on the networkB. The type of system bus used by the computersC. The type of memory installed in each computerD. The type of media used in the network topologyE. The type of protocols used in the networkF. The physical layout of the network hosts

Accelerated analysis approaches emphasize the construction of(请作答此空)to more rapidly identify business and user requirements for a new system. As an accelerated analysis technology,( )reads the program code and automatically generates the equivalent system model, and the code can be obtained from ( ). All system analysis approaches require some form of( )which includes those techniques to be used to identify or extract system problems and solution requirements from user community. ( )is a classical set of techniques used to collect information about system problems, opportunities, solution requirements, and priorities.A. object modelsB. prototypesC. use casesD. components

When servicing a laptop, which of the following components usually requires the keyboard to beremoved before the component can be replaced?()A、ProcessorB、Hard driveC、BatteryD、Optical drive

Which three objects can be components of a menu module?() A、windows B、parameters C、object groups D、report objects E、visual attributes

Which statement is true?()  A、 A flow layout can be used to position a component that should resize horizontally when the  container is resized.B、 A grid layout can be used to position a component tat should maintain a constant size even when  the container is resized.C、 A border layout can be used to position component that should maintain a constant size even when  the container is resized.D、 The grid bag layout can be used to give a grid-like layout which differs from the normal grid in that individual rows and columns can have unique sizes.E、 If two components are placed in the same column of a grid bag layout, and one component resizes horizontally, then the other component must resize horizontally.

When selecting a Network Interface Card (NIC), which of the following factors need to be considered?()A、The type of application used on the networkB、The type of system bus used by the computersC、The type of memory installed in each computerD、The type of media used in the network topologyE、The type of protocols used in the networkF、The physical layout of the network hosts

Which of the following can be used to insert a new line below the current line inside a vi session?()A、oB、aC、pD、A

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.

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

How does the weighty property of the GridBagConstraints objects used in grid bag layout affect the layout of the components?()  A、It affects which grid cell the components end up in.B、It affects how the extra vertical space is distributed.C、It affects the alignment of each component.D、It affects whether the components completely fill their allotted display area vertically.

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)

单选题When building the job stream MASTER#NEW_STREAM in the composer  command line, which option should be used to apply the settings in the  Variable Table "LIVE_VARS" to be associated to the  jobs in the job stream?()A AB BC CD D

单选题Which of the following can be used to insert a new line below the current line inside a vi session?()AoBaCpDA

单选题Click the Exhibit button. Given this code from Class B: 25.A a1 = new A(); 26.A a2 = new A(); 27.A a3 = new A(); 28.System.out.println(A.getInstanceCount()); What is the result?()A Compilation of class A fails.B Line 28 prints the value 3 to System.out.C Line 28 prints the value 1 to System.out.D A runtime error occurs when line 25 executes.E Compilation fails because of an error on line 28.

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

单选题How does the weighty property of the GridBagConstraints objects used in grid bag layout affect the layout of the components?()AIt affects which grid cell the components end up in.BIt affects how the extra vertical space is distributed.CIt affects the alignment of each component.DIt affects whether the components completely fill their allotted display area vertically.

多选题When selecting a Network Interface Card (NIC), which of the following factors need to be considered?()AThe type of application used on the networkBThe type of system bus used by the computersCThe type of memory installed in each computerDThe type of media used in the network topologyEThe type of protocols used in the networkFThe physical layout of the network hosts

单选题Given: 12.Date date = new Date(); 13.df.setLocale(Locale.ITALY); 14.String s = df.format(date); The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14, 2000?()AThe value of s is 14-dic-2000.BThe value of s is Dec 14, 2000.CAn exception is thrown at runtime.DCompilation fails because of an error in line 13.

填空题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.()