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

题目内容 (请给出正确答案)
多选题
Given a class whose instances, when found in a collection of objects, are sorted by using the compare To 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.


参考答案

参考解析
解析: 暂无解析
更多 “多选题Given a class whose instances, when found in a collection of objects, are sorted by using the compare To 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.

考题 Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()A、 The tag is invoked without a body.B、 The doTAb method throws an exception.C、 The  element has the value empty.D、 The tag is called with the attribute skip-body=true

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

考题 Which the two demonstrate an “is a” relationship?()A、 public interface Person {}  Public class Employee extends Person {}B、 public interface Shape {}  public interface Rectangle extends Shape {}C、 public interface Color {}  public class Shape { private Color color; }D、 public class Species {}  public class Animal { private Species species; }E、 interface Component {} Class Container implements Component {private Component [] children;

考题 Which two demonstrate an “is a” relationship?()   A、 public interface Person { }  public class Employee extends Person { }B、 public interface Shape { }  public class Employee extends Shape { }C、 public interface Color { }  public class Employee extends Color { }D、 public class Species { }  public class Animal (private Species species;)E、 interface Component { }  Class Container implements Component ( Private Component[ ]children;  )

考题 Which of the following statements are true?() A、 The equals() method determines if reference values refer to the same object.B、 The == operator determines if the contents and type of two separate objects match.C、 The equals() method returns true only when the contents of two objects match.D、 The class File overrides equals() to return true if the contents and type of two separate objects match.

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

考题 You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()A、Your filter class must implement an init method and a destroy method.B、Your filter class must also implement javax.servlet.FilterChain.C、When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.D、The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.E、Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.

考题 class A {  }  class Alpha {  private A myA = new A();  void dolt( A a ) {  a = null;  }  void tryIt() {  dolt( myA );  }  }  Which two statements are correct?()  A、 There are no instanced of A that will become eligible for garbage collection.B、 Explicitly setting myA to null marks that instance to be eligible for garbage collection.C、 Any call on tryIt() causes the private instance of A to be marked for garbage collection.D、 Private instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.

考题 Which statement is true?()A、A class’s finalize() method CANNOT be invoked explicitly.B、super.finalize() is called implicitly by any overriding finalize() method.C、The finalize() method for a given object is called no more than once by the garbage collector.D、The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

考题 Given a class whose instances, when found in a collection of objects, are sorted by using the compare To 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.

考题 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 the elements within that set.C、The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, 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.

考题 You work as an application developer at Certkiller .com. You are developing a collection class named ClientCollection, which is to be used for storing the names of Certkiller .com’s clients that are situated in various geographical areas. These client names are represented by the Client class. You are planning to create a method named SortClients in the ClientCollection class to arrange Client objects in ascending order. You need to ensure that the appropriate interface is implemented by the Client class to allow sorting.What interface should be used?()A、 IDictionaryB、 IComparableC、 IComparerD、 IEqualityComparer

考题 You are defining a class named MyClass that contains several child objects. MyClass contains a method named ProcessChildren that performs actions on the child objects.MyClass objects will be serializable.You need to ensure that the ProcessChildren method is executed after the MyClass object and all its child objects are reconstructed. Which two actions should you perform?()A、Apply the OnDeserializing attribute to the ProcessChildren method.B、Specify that MyClass implements the IDeserializationCallback interface.C、Specify that MyClass inherits from the ObjectManager class.D、Apply the OnSerialized attribute to the ProcessChildren method.E、Create a GetObjectData method that calls ProcessChildren.F、Create an OnDeserialization method that calls ProcessChildren.

考题 多选题Which of the following statements are true?()AThe equals() method determines if reference values refer to the same object.BThe == operator determines if the contents and type of two separate objects match.CThe equals() method returns true only when the contents of two objects match.DThe class File overrides equals() to return true if the contents and type of two separate objects match.

考题 多选题Whitch two statements are true regarding the role of the Routing Engine (RE)? ()AThe RE controls and monitors the chassisBThe RE manages the Packet Forwarding Engine (PFE)CThe RE receives a copy of the forwarding table from the forwarding planeDThe RE implements class of service (COS)

考题 多选题Given: 10. interface Jumper { public void jump(); } ...   20. class Animal {} ...   30. class Dog extends Animal {   31. Tail tail;   32. }   ...   40. class Beagle extends Dog implements Jumper{   41. public void jump() {}  42. }   ...   50. class Cat implements Jumper{   51. public void jump() {}   52. }. Which three are true?()ACat is-a JumperBCat is-a AnimalCDog is-a JumperDDog is-a AnimalEBeagle has-a JumperFCat has-a AnimalGBeagle has-a Tail

考题 多选题Which two demonstrate an “is a” relationship?()Apublic interface Person { }  public class Employee extends Person { }Bpublic interface Shape { }  public class Employee extends Shape { }Cpublic interface Color { }  public class Employee extends Color { }Dpublic class Species { }  public class Animal (private Species species;)Einterface Component { }  Class Container implements Component ( Private Component[ ]children;  )

考题 多选题You are defining a class named MyClass that contains several child objects. MyClass contains a method named ProcessChildren that performs actions on the child objects.MyClass objects will be serializable.You need to ensure that the ProcessChildren method is executed after the MyClass object and all its child objects are reconstructed. Which two actions should you perform?()AApply the OnDeserializing attribute to the ProcessChildren method.BSpecify that MyClass implements the IDeserializationCallback interface.CSpecify that MyClass inherits from the ObjectManager class.DApply the OnSerialized attribute to the ProcessChildren method.ECreate a GetObjectData method that calls ProcessChildren.FCreate an OnDeserialization method that calls ProcessChildren.

考题 多选题Given a class whose instances, when found in a collection of objects, are sorted by using the compare To 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.

考题 多选题Which the two demonstrate an “is a” relationship?()Apublic interface Person {}  Public class Employee extends Person {}Bpublic interface Shape {}  public interface Rectangle extends Shape {}Cpublic interface Color {}  public class Shape { private Color color; }Dpublic class Species {}  public class Animal { private Species species; }Einterface Component {} Class Container implements Component {private Component [] children;

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

考题 多选题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 the elements within that set.CThe hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, 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.

考题 多选题Which two statements are true regarding the role of the Routing Engine (RE)?()AThe RE controls and monitors the chassis.BThe RE manages the Packet Forwarding Engine (PFE).CThe RE receives a copy of the forwarding table from the forwarding plane.DThe RE implements class of service (COS).

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

考题 单选题You work as an application developer at Certkiller .com. You are developing a collection class named ClientCollection, which is to be used for storing the names of Certkiller .com’s clients that are situated in various geographical areas. These client names are represented by the Client class. You are planning to create a method named SortClients in the ClientCollection class to arrange Client objects in ascending order. You need to ensure that the appropriate interface is implemented by the Client class to allow sorting.What interface should be used?()A  IDictionaryB  IComparableC  IComparerD  IEqualityComparer

考题 多选题Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()AThe tag is invoked without a body.BThe doTAb method throws an exception.CThe  element has the value empty.DThe tag is called with the attribute skip-body=true

考题 多选题Which two statements are true regarding the creation of a default constructor?()AThe default constructor initializes method variables.BThe default constructor invokes the no-parameter constructor of the superclass.CThe default constructor initializes the instance variables declared in the class.DIf a class lacks a no-parameter constructor,, but has other constructors, the compiler creates a default constructor.EThe compiler creates a default constructor only when there are no other constructors for the class.