多选题Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()AThe class implements java.lang.Comparable.BThe class implements java.util.Comparator.CThe interface used to implement sorting allows this class to define only one sort sequence.DThe interface used to implement sorting allows this class to define many different sort sequences.
多选题
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.
参考解析
解析:
暂无解析
相关考题:
He used to have a ____of stamp-collection, but he has given it up. A.habitB.hobbyC.customD.like
Given:When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?() A.Line 5B.Line 6C.Line 7D.Line 8E.Line 9F.Line 10
Router R1, a branch router, connects to the Internet using DSL. Some traffic flows through a GRE and IPsec tunnel, over the DSL connection, destined for an Enterprise network.Which of the following answers best describes the router‘s logic that tells the router, for a given packet, to apply GRE encapsulation to the packet?()A. When the packet received on the LAN interface is permitted by the ACL listed on the tunnel greacl command under the incoming interfaceB. When routing the packet, matching a route whose outgoing interface is the GRE tunnel interfaceC. When routing the packet, matching a route whose outgoing interface is the IPsec tunnel interfaceD. When permitted by an ACL that was referenced in the associated crypto map
The residents, ___________had been damaged by the flood, were given help by the Red Cross.A.all their homesB.all whose homesC.all of whose homesD.all of their homes
Router R1, a branch router, connects to the Internet using DSL. Some traffic flows through a GRE and IPsec tunnel, over the DSL connection, destined for an Enterprise network. Which of the following answers best describes the router's logic that tells the router, for a given packet, to apply GRE encapsulation to the packet?()A、When the packet received on the LAN interface is permitted by the ACL listed on the tunnel greacl command under the incoming interfaceB、When routing the packet, matching a route whose outgoing interface is the GRE tunnel interfaceC、When routing the packet, matching a route whose outgoing interface is the IPsec tunnel interfaceD、When permitted by an ACL that was referenced in the associated crypto map
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 theelements within that set.C、 The hashCode method for a given class can be used to test for object inequality, but NOT object equality, 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.
Which statement is true for the class java.util.HashSet? () A、 The elements in the collection are ordered.B、 The collection is guaranteed to be immutable.C、 The elements in the collection are guaranteed to be unique.D、 The elements in the collection are accessed using a unique key.E、 The elements in the collections are guaranteed to be synchronized.
You work as an application developer at Certkiller .com. Certkiller .com has been hired by a small local private school to develop a class library that will be used in an application named ManageAttendance for the purpose of managing student records.You are responsible for developing this class library. Certkiller .com has instructed you to create a collection in the application to store learners’ results. The school has informed you that they currently only have seven learners, but that this value will triple in the following year. Due to the limited resources, you need to ensure that the collection you create consumes a minimum amount of resources. What should you use to create the collection?()A、 The HybridDictionary collection class.B、 The HashTable collection class.C、 The ListDictionary collection class.D、 The StringCollection collection class.
1. class Test { 2. private Demo d; 3. void start() { 4. d = new Demo(); 5. this.takeDemo(d); 6. } 7. 8. void takeDemo(Demo demo) { 9. demo = null; 10. demo = new Demo(); 11. } 12. } When is the Demo object, created on line 3, eligible for garbage collection?() A、 After line 5.B、 After line 9.C、 After the start() method completes.D、 When the takeDemo() method completes.E、 When the instance running this code is made eligible for garbage collection.
Which statements concerning the methods notify() and notifyAll() are true? A、Instances of class Thread have a method called notify().B、A call to the method notify() will wake the thread that currently owns the monitor of the object.C、The method notify() is synchronized.D、The method notifyAll() is defined in class Thread.E、When there is more than one thread waiting to obtain the monitor of an object, there is no way to be sure which thread will be notified by the notify() method.
Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?() A、 java CommanderB、 java com. sim. sjcp.CommanderC、 java com/sun/sjcp/CommanderD、 java -cp com.sun.sjcp CommanderE、 java -cp com/sun/sjcp Commander
Given the following code: public class Person{ int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1]); } } Which statement is correct?() A、 When compilation some error will occur.B、 It is correct when compilation but will cause error when running.C、 The output is zero.D、 The output is null.
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.
When an ASM instance receives a SHUTDOWN NORMAL command,what command does it pass on to all database instances that rely on the ASM instances disk groups?()A、 TRANSACTIONALB、 IMMEDIATEC、 ABORTD、 NORMAL
You are creating a Windows Communication Foundation (WCF) service. The service endpoints change frequently. On the service, you add a new ServiceDiscoveryBehavior to the Behaviors collection of the ServiceHost Description property. You need to ensure that client applications can communicate with the service and discover changes to the service endpoints. What should you do?()A、Add a new ServiceDiscoveryBehavior to the Behaviors collection in the client application.B、Add a new AnnouncementClient to the Behaviors collection in the client application.C、Use the FindCriteria class and the UdpDiscoveryEndpoint class to set up the binding in the client application.D、Use the DiscoveryProxy class and the EndpointDiscoveryMetadata class to set up the binding in the client application.
You work as an application developer at Certkiller .com. Certkiller .com has been contracted to develop an application for the local bank.You have been given the responsibility of creating this application and need to store each transaction record, which is identified using a complex transaction identifier,in memory. The bank informs you that the total amount of transaction records could reach 200 per day. To achieve this, you decide to utilize one of the existing collection classes in the .NET 2.0 class library. You need to ensure that you the collection class you select is the most efficient one for storing transaction records.What should you do?()A、 Select the ListDictionary collection class.B、 Select the HashTable collection class.C、 Select the Queue collection class.D、 Select the StringCollection collection class.
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 work as an application developer at Certkiller .com. You have recently created a custom collection class named ShoppingList for a local supermarket. This custom class will include ShoppinItem objects that have the public properties listed below. * Name * AisleNumber * OnDiscount You are required to enable users of your class to iterate through the ShoppingList collection, and to list each product name and aisle number using the foreach statement.You need to achieve this by declaring the appropriate code.What code should you use?()A、 public class ShoppingList : ICollection {// Class implementation }B、 public class ShoppingList : IEnumerator, IEnumerable {// Class implementation }C、 public class ShoppingList : Ilist {// Class implementation }D、 public class ShoppingList : Enum {// Class implementation }
单选题Sentence 6 (reproduced below) can best be revised in what way?Reynolds found out that when he was Lisa, it is a second-class world to be a woman looking for a job.A(As it is now)BWhen he was Lisa, Reynolds found that it was a second-class existence for a woman seeking work in the world.CAlthough as Lisa, Reynolds felt it is a second-class world to be a woman looking for a job.DReynolds as Lisa experienced the second-class world of female job applicants.EIn Reynolds’s opinion, he felt as Lisa that it is a second-class world for female job applicants.
单选题Given the following code: public class Person{ static int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1];) } } Which statement is correct?()A When compilation some error will occur.B It is correct when compilation but will cause error when running.C The output is zero.D The output is null.
多选题Given: 3.class MyServlet extends HttpServlet { 4.public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { 5.// servlet code here ... 26.} 27.} If the DD contains a single security constraint associated with MyServlet and its only tagsand tags are:GETPUT Admin Which four requests would be allowed by the container?()AA user whose role is Admin can perform a PUT.BA user whose role is Admin can perform a GET.CA user whose role is Admin can perform a POST.DA user whose role is Member can perform a PUT.EA user whose role is Member can perform a POST.FA user whose role is Member can perform a GET.
单选题Given: When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()A Line 5B Line 6C Line 7D Line 8E Line 9F Line 10
单选题1. class Test { 2. private Demo d; 3. void start() { 4. d = new Demo(); 5. this.takeDemo(d); 6. } 7. 8. void takeDemo(Demo demo) { 9. demo = null; 10. demo = new Demo(); 11. } 12. } When is the Demo object, created on line 3, eligible for garbage collection?()A After line 5.B After line 9.C After the start() method completes.D When the takeDemo() method completes.E When the instance running this code is made eligible for garbage collection.
单选题Which statement is true for the class java.util.ArrayList?()A The elements in the collection are ordered.B The collection is guaranteed to be immutable.C The elements in the collection are guaranteed to be unique.D The elements in the collection are accessed using a unique key.E The elements in the collections are guaranteed to be synchronized.
多选题Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true?()AThe class implements java.lang.Comparable.BThe class implements java.util.Comparator.CThe interface used to implement sorting allows this class to define only one sort sequence.DThe interface used to implement sorting allows this class to define many different sort sequences.
多选题class A { } class Alpha { private A myA = new A(); void dolt( A a ) { a = null; } void tryIt() { dolt( myA ); } } Which two statements are correct?()AThere are no instanced of A that will become eligible for garbage collection.BExplicitly setting myA to null marks that instance to be eligible for garbage collection.CAny call on tryIt() causes the private instance of A to be marked for garbage collection.DPrivate instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.
单选题Given the following code: public class Person{ int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1]); } } Which statement is correct?()A When compilation some error will occur.B It is correct when compilation but will cause error when running.C The output is zero.D The output is null.
多选题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 theelements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT object equality, 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.