单选题You want to use te Coherence Java APIs to directly cached POJOs. Consider this snippet of code: NamedCache cache - CacheFactory.getCache("mycache");  cache.put(new Integer(I)f "hello"); cache.put(T,"hi");  cache.put(new Long(II),"hey");  This code inse

题目
单选题
You want to use te Coherence Java APIs to directly cached POJOs. Consider this snippet of code: NamedCache cache - CacheFactory.getCache("mycache");  cache.put(new Integer(I)f "hello"); cache.put(T,"hi");  cache.put(new Long(II),"hey");  This code inserts three objects into the cache.  Why ?()
A

 hashCode() and equals() method for each object type is different so a different key is used

B

 each object value string is different so a different value is inserted on each put

C

 equals() and compare() method is different for each put

D

 POF need to be implemented for this to work properly


相似考题
更多“单选题You want to use te Coherence Java APIs to directly cached POJOs. Consider this snippet of code: NamedCache cache - CacheFactory.getCache("mycache");  cache.put(new Integer(I)f "hello"); cache.put(T,"hi");  cache.put(new Long(II),"hey");  This code inse”相关问题
  • 第1题:

    You need to create a JSP that generates some JavaScript code to populate an array of strings used on theclient-side. Which JSP code snippet will create this array?()

    • A、MY_ARRAY = new Array();<% for ( int i = 0; i < serverArray.length; i++ ) { MY_ARRAY[<%= i %>] = ’<%= serverArray[i] %>’;} %>
    • B、MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { . MY_ARRAY[${i}] = ’${serverArray[i]}’;. } %>
    • C、MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[<%= i %>] = ’<%= serverArray[i] %>’;. <% } %>
    • D、MY_ARRAY = new Array();<% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[${i}] = ’${serverArray[i]}’;. <% } %>

    正确答案:C

  • 第2题:

    You work as an application developer at Certkiller .com. Certkiller .com wants you to develop an application that stores and retrieves client information by means of a unique account number.You create a custom collection class, which implements the IDictionary interface,named ClientDictionary. The following code have been included into the new application. //Create Client objects Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary object IDictionary cData = new ClientDictionary (); cData.Add ("10001", c1); cData.Add ("10002", c2); You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.What should you do?()

    • A、 Use the following code: Client foundClient;foundClient = (Client) cData.Find ("10111"); 
    • B、 Use the following code: Client foundClient;if (cData.Contains ("10111")) foundClient = cData ["10111"]; 
    • C、 Use the following code: Client foundClient;if (cData.Contains ("10111"))foundClient =(Client) cData ["10111"]; 
    • D、 Use the following code: Client foundClient;foreach (string key in cData.Keys {if (key == "10111")foundClient = (Client) cData.Values ["10111"]; }

    正确答案:C

  • 第3题:

    1. import java.util.*;  2. public class Example {  3. public static void main(String[] args) {  4. // insert code here  5. set.add(new integer(2));  6. set.add(new integer(l));  7. System.out.println(set);  8. }  9. }  Which code, inserted at line 4, guarantees that this program will output [1,2]? ()

    • A、 Set set = new TreeSet();
    • B、 Set set = new HashSet();
    • C、 Set set = new SortedSet();
    • D、 List set = new SortedList();
    • E、 Set set = new LinkedHashSet();

    正确答案:A

  • 第4题:

    Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work?   CODE BLOCK a:   Runnable r = new Runnable() {   public void run() {   Work.doIt();   }   };   Thread t = new Thread(r);   t.start();   CODE BLOCK b:   Thread t = new Thread() {  public void start() {   Work.doIt();  }  };   t.start();   CODE BLOCK c:   Runnable r = new Runnable() {   public void run() {   Work.doIt();   }   };   r.start();  CODE BLOCK d:   Thread t = new Thread(new Work());   t.start();   CODE BLOCK e:   Runnable t = new Runnable() {   public void run() {   Work.doIt();   }   };   t.run();  

    • A、Code block a.
    • B、Code block B.
    • C、Code block c.
    • D、Code block d.
    • E、Code block e.

    正确答案:A

  • 第5题:

    You want to access employee details contained in flat files as part of the EMPLOYEE table. You planto add a new column to the EMPLOYEE table to achieve this.  Which data type would you use for the new column()

    • A、CLOB
    • B、BLOB
    • C、BFILE
    • D、LONG RAW

    正确答案:C

  • 第6题:

    You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath. You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. What should you do?()

    • A、 Write the following code segment in the button onclick event.     System.Media.    SoundPlayer player = new System.Media.    SoundPlayer(SoundFilePath); player.play();
    • B、 Write the following code segment in the button onclick event.    MediaPlayer player = new MediaPlayer();     player.Open(new URI(SoundFilePath),    UriKind.Relative)); player.play();
    • C、 Use the following code segment from the PlaySound()    Win32 API function and call the PlaySound function in the button onclick event.    [sysimport(dll="winmm.dll")]     public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);
    • D、 Reference the Microsoft.DirectX Dynamic Link Libraries.     Use the following code segment in the button onclick event.     Audio song = new Song(SoundFilePath);     song.CurrentPosition = song.Duration; song.Play();

    正确答案:B

  • 第7题:

    单选题
    You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust. You write the following code to ensure usage of the socket connections.  SocketPermission permission =   new SocketPermission(PermissionState.Unrestricted);  permission.Assert(); Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.You need to cancel the assertion. Which code segment should you use?()
    A

    CodeAccessPermission.RevertAssert();

    B

    CodeAccessPermission.RevertDeny();

    C

    permission.Deny();

    D

    permission.PermitOnly();


    正确答案: C
    解析: 暂无解析

  • 第8题:

    单选题
    1. import java.util.*;  2. public class Example {  3. public static void main(String[] args) {  4. // insert code here  5. set.add(new integer(2));  6. set.add(new integer(l));  7. System.out.println(set);  8. }  9. }  Which code, inserted at line 4, guarantees that this program will output [1,2]? ()
    A

     Set set = new TreeSet();

    B

     Set set = new HashSet();

    C

     Set set = new SortedSet();

    D

     List set = new SortedList();

    E

     Set set = new LinkedHashSet();


    正确答案: D
    解析: 暂无解析

  • 第9题:

    多选题
    Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()
    A

    (i = = l)

    B

    (i = = d)

    C

    (d = = l)

    D

    (i.equals(d))

    E

    (i.equals(i))

    F

    (i.equals(42))


    正确答案: D,A
    解析: 暂无解析

  • 第10题:

    单选题
    You work as the application developer at Hi-Tech.com. You create a new custom dictionary named MyDictionary. Choose the code segment which will ensure that MyDictionary is type safe?()
    A

     Class MyDictionary Implements Dictionary (Of String,String)

    B

     Class MyDictionary Inherits HashTable

    C

     Class MyDictionary Implements IDictionary

    D

     Class MyDictionary     End Class     Dim t as New Dictionary (Of String, String)     Dim dict As MyDIctionary= CType (t,MyDictionary)


    正确答案: A
    解析: 暂无解析

  • 第11题:

    单选题
    import java.awt.*;   public class Test extends Frame {   public Test() {   add(new Label(“Hello”) );   add(new TextField(“Hello”) );   add(new Button(“Hello”) );   pack();   show();    }   public static void main(String args) {   new Test ();   }   }   What is the result? ()
    A

     The code will not compile.

    B

     A Window will appear containing only a Button.

    C

     An IllegalArgumentException is thrown at line 6.

    D

     A Window button will appear but will not contain the Label, TextField, or Button.

    E

     A Window will appear containing a Label at the top, a TextField below the Label, and a Button  below the TextField.

    F

     A Window will appear containing a Label on the left, a TextField to the right of the Label, and a button to the right of the TextField.


    正确答案: B
    解析: 暂无解析

  • 第12题:

    多选题
    Integer i = new Integer (42);   Long 1 = new Long (42);  Double d = new Double (42.0); Which two expressions evaluate to True? ()
    A

    (i ==1)

    B

    (i == d)

    C

    (d == 1)

    D

    (i.equals (d))

    E

    (d.equals (i))

    F

    (i.equals (42))


    正确答案: E,B
    解析: 暂无解析

  • 第13题:

    Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()

    • A、 (i = = l)
    • B、 (i = = d)
    • C、 (d = = l)
    • D、 (i.equals(d))
    • E、 (i.equals(i))
    • F、 (i.equals(42))

    正确答案:D,E

  • 第14题:

    Integer i = new Integer (42);  Long 1 = new Long (42);  Double d = new Double (42.0);   Which two expressions evaluate to True?()

    • A、 (i ==1)
    • B、 (i == d)
    • C、 (d == 1)
    • D、 (i.equals (d))
    • E、 (d.equals (i))
    • F、 (i.equals (42)

    正确答案:D,E

  • 第15题:

    import java.awt.*;   public class Test extends Frame {   public Test() {   add(new Label(“Hello”) );   add(new TextField(“Hello”) );   add(new Button(“Hello”) );   pack();   show();    }   public static void main(String args) {   new Test ();   }   }   What is the result? () 

    • A、 The code will not compile.
    • B、 A Window will appear containing only a Button.
    • C、 An IllegalArgumentException is thrown at line 6.
    • D、 A Window button will appear but will not contain the Label, TextField, or Button.
    • E、 A Window will appear containing a Label at the top, a TextField below the Label, and a Button  below the TextField.
    • F、 A Window will appear containing a Label on the left, a TextField to the right of the Label, and a button to the right of the TextField.

    正确答案:B

  • 第16题:

    You want to use te Coherence Java APIs to directly cached POJOs. Consider this snippet of code: NamedCache cache - CacheFactory.getCache("mycache");  cache.put(new Integer(I)f "hello"); cache.put(T,"hi");  cache.put(new Long(II),"hey");  This code inserts three objects into the cache.  Why ?()

    • A、 hashCode() and equals() method for each object type is different so a different key is used
    • B、 each object value string is different so a different value is inserted on each put
    • C、 equals() and compare() method is different for each put
    • D、 POF need to be implemented for this to work properly

    正确答案:A

  • 第17题:

    You work as the application developer at Hi-Tech.com. You create a new custom dictionary named MyDictionary. Choose the code segment which will ensure that MyDictionary is type safe?()

    • A、 Class MyDictionary Implements Dictionary (Of String,String)
    • B、 Class MyDictionary Inherits HashTable
    • C、 Class MyDictionary Implements IDictionary
    • D、 Class MyDictionary     End Class     Dim t as New Dictionary (Of String, String)     Dim dict As MyDIctionary= CType (t,MyDictionary)

    正确答案:A

  • 第18题:

    单选题
    You need to create a JSP that generates some JavaScript code to populate an array of strings used on theclient-side. Which JSP code snippet will create this array?()
    A

    MY_ARRAY = new Array();<% for ( int i = 0; i < serverArray.length; i++ ) { MY_ARRAY[<%= i %>] = ’<%= serverArray[i] %>’;} %>

    B

    MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { . MY_ARRAY[${i}] = ’${serverArray[i]}’;. } %>

    C

    MY_ARRAY = new Array();. <% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[<%= i %>] = ’<%= serverArray[i] %>’;. <% } %>

    D

    MY_ARRAY = new Array();<% for ( int i = 0; i < serverArray.length; i++ ) { %> . MY_ARRAY[${i}] = ’${serverArray[i]}’;. <% } %>


    正确答案: D
    解析: 暂无解析

  • 第19题:

    单选题
    You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath. You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. What should you do?()
    A

     Write the following code segment in the button onclick event.     System.Media.    SoundPlayer player = new System.Media.    SoundPlayer(SoundFilePath); player.play();

    B

     Write the following code segment in the button onclick event.    MediaPlayer player = new MediaPlayer();     player.Open(new URI(SoundFilePath),    UriKind.Relative)); player.play();

    C

     Use the following code segment from the PlaySound()    Win32 API function and call the PlaySound function in the button onclick event.    [sysimport(dll=winmm.dll)]     public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);

    D

     Reference the Microsoft.DirectX Dynamic Link Libraries.     Use the following code segment in the button onclick event.     Audio song = new Song(SoundFilePath);     song.CurrentPosition = song.Duration; song.Play();


    正确答案: A
    解析: 暂无解析

  • 第20题:

    多选题
    You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session?()
    A

    long customerOID = 47L;session.setAttribute(customerOID, new Long(customerOID));

    B

    long customerOID = 47L;session.setLongAttribute(customerOID, new Long(customerOID));

    C

    long customerOID = 47L;session.setAttribute(customerOID, customerOID);

    D

    long customerOID = 47L;session.setNumericAttribute(customerOID, new Long(customerOID));


    正确答案: A,D
    解析: 暂无解析

  • 第21题:

    单选题
    You are creating an undo buffer that stores data modifications.You need to ensure that the undo functionality undoes the most recent data modifications first.You also need to ensure that the undo buffer permits the storage of strings only.Which code segment should you use?()
    A

    Stack<string> undoBuffer=new Stack<string>();

    B

    Stack undoBuffer=new Stack();

    C

    Queue<string> undoBuffer=new Queue<string>();

    D

    Queue undoBuffer=new Queue();


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    You work as an application developer at Certkiller .com. Certkiller .com wants you to develop an application that stores and retrieves client information by means of a unique account number.You create a custom collection class, which implements the IDictionary interface,named ClientDictionary. The following code have been included into the new application. //Create Client objects Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary object IDictionary cData = new ClientDictionary (); cData.Add ("10001", c1); cData.Add ("10002", c2); You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.What should you do?()
    A

     Use the following code: Client foundClient;foundClient = (Client) cData.Find (10111); 

    B

     Use the following code: Client foundClient;if (cData.Contains (10111)) foundClient = cData [10111]; 

    C

     Use the following code: Client foundClient;if (cData.Contains (10111))foundClient =(Client) cData [10111]; 

    D

     Use the following code: Client foundClient;foreach (string key in cData.Keys {if (key == 10111)foundClient = (Client) cData.Values [10111]; }


    正确答案: C
    解析: 暂无解析

  • 第23题:

    单选题
    Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work?   CODE BLOCK a:   Runnable r = new Runnable() {   public void run() {   Work.doIt();   }   };   Thread t = new Thread(r);   t.start();   CODE BLOCK b:   Thread t = new Thread() {  public void start() {   Work.doIt();  }  };   t.start();   CODE BLOCK c:   Runnable r = new Runnable() {   public void run() {   Work.doIt();   }   };   r.start();  CODE BLOCK d:   Thread t = new Thread(new Work());   t.start();   CODE BLOCK e:   Runnable t = new Runnable() {   public void run() {   Work.doIt();   }   };   t.run();
    A

    Code block a.

    B

    Code block B.

    C

    Code block c.

    D

    Code block d.

    E

    Code block e.


    正确答案: C
    解析: 暂无解析