网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
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 inserts three objects into the cache.  Why ?()A  hashCode() and equals() method for each object type is different so a different key is usedB  each object value string is different so a different value is inserted on each putC  equals() and compare() method is different for each putD  POF need to be implemented for this to work properly” 相关考题
考题 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 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.

考题 YouwanttouseteCoherenceJavaAPIstodirectlycachedPOJOs.Considerthissnippetofcode:NamedCachecache-CacheFactory.getCache(mycache);cache.put(newInteger(I)fhello);cache.put(T,hi);cache.put(newLong(II),hey);Thiscodeinsertsthreeobjectsintothecache.Why?()A.hashCode()andequals()methodforeachobjecttypeisdifferentsoadifferentkeyisusedB.eachobjectvaluestringisdifferentsoadifferentvalueisinsertedoneachputC.equals()andcompare()methodisdifferentforeachputD.POFneedtobeimplementedforthistoworkproperly

考题 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));

考题 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]}’;. % } %

考题 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))

考题 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"]; }

考题 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)

考题 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();

考题 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.

考题 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.

考题 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 usedB、 each object value string is different so a different value is inserted on each putC、 equals() and compare() method is different for each putD、 POF need to be implemented for this to work properly

考题 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、CLOBB、BLOBC、BFILED、LONG RAW

考题 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 HashTableC、 Class MyDictionary Implements IDictionaryD、 Class MyDictionary End Class Dim t as New Dictionary (Of String, String) Dim dict As MyDIctionary= CType (t,MyDictionary)

考题 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();

考题 单选题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]}’;. % } %

考题 单选题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();

考题 单选题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();

考题 单选题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();

考题 多选题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?()Along customerOID = 47L;session.setAttribute(customerOID, new Long(customerOID));Blong customerOID = 47L;session.setLongAttribute(customerOID, new Long(customerOID));Clong customerOID = 47L;session.setAttribute(customerOID, customerOID);Dlong customerOID = 47L;session.setNumericAttribute(customerOID, new Long(customerOID));

考题 多选题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))

考题 单选题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 Stackstring undoBuffer=new Stackstring();B Stack undoBuffer=new Stack();C Queuestring undoBuffer=new Queuestring();D Queue undoBuffer=new Queue();

考题 单选题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 HashTableC  Class MyDictionary Implements IDictionaryD  Class MyDictionary End Class Dim t as New Dictionary (Of String, String) Dim dict As MyDIctionary= CType (t,MyDictionary)

考题 单选题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]; }

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

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

考题 多选题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))