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

题目内容 (请给出正确答案)

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.

参考答案

更多 “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.” 相关考题
考题 Which two are true?() A.A finalizer may NOT be invoked explicitly.B.The finalize method declared in class Object takes no action.C.super.finalize()is called implicitly by any over riding finalize method.D.The finalize method for a given objec twill be called no more than once by the garbage collector.E.The order in which finalize will be 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 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.

考题 Which of the following statements regarding routed and routing protocols are true?() A. A routed protocol is assigned to an interface and determines the method of packet deliver.B. A routing protocol determines the path of a packet through a network.C. A routed protocol determines the path of a packet through a network.D. A routing protocol operates at the transport layer of the OSI model.E. A routed protocol updates the routing table of a router.

考题 Part of the job as a network administrator is being able to make a distinction between routed protocols and routing protocols. Which of the following statements is true regarding them?() A. A routing protocol is assigned to an interface and determines the method of packet delivery.B. A routed protocol is assigned to an interface and determines the method of packet delivery.C. A routing protocol determines the path of a packet through a network.D. A routed protocol determines the path of a packet through a network.E. A routing protocol operates at the transport layer of the OSI model.F. A routed protocol updates the routing table of a router.

考题 1. public class Person {  2. private String name;  3. public Person(String name) { this.name = name; }  4. public boolean equals(Person p) {  5. return p.name.equals(this.name);  6. }  7. }  Which is true?() A、 The equals method does NOT properly override the Object.equals method.B、 Compilation fails because the private attribute p.name cannot be accessed in line 5.C、 To work correctly with hash-based data structures, this class must also implement the hashCode method.D、 When adding Person objects to a java.util.Set collection, the equals method in line 4 will prevent duplicates.

考题 Which two of statements are true?()A、It is possible to synchronize static methods.B、When a thread has yielded as a result of yield(), it releases its locks.C、When a thread is sleeping as a result of sleep(), it releases its locks.D、The Object.wait() method can be invoked only from a synchronized context.E、The Thread.sleep() method can be invoked only from a synchronized context.F、When the thread scheduler receives a notify() request, and notifies a thread, that thread immediately releases its lock.

考题 Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class?()A、 If the hashCode values are different, the objects might be equal.B、 If the hashCode values are the same, the object must be equal.C、 If the hashCode values are the same, the objects might be equal.D、 If the hashCode values are different, the objects must be unequal.

考题 Which of the following statements about variables and scope are true?() A、 Local variables defined inside a method are destroyed when the method is exited.B、 Local variables are also called automatic variables.C、 Variables defined outside a method are created when the object is constructed.D、 A method parameter variable continues to exist for as long as the object is needed in which the method is defined.

考题 Given that b and c refer to instances of wrapper classes, which two statements are true?()A、 b.equals(b) returns true.B、 b.equals(c) returns the same result as b == c.C、 b.eqials(c) can return false even if c.equals(b) returns true.D、 b.equals(c) throws an exception if b and c are different wrapper types.E、 b.equals(c) returns false if the type of wrapper objects being compared are different.

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

考题 public class Person {  private name;  public Person(String name) {  this.name = name;  }  public boolean equals(Object o) {  if( !o instanceof Person ) return false;  Person p = (Person) o;  return p.name.equals(this.name);  }  }  Which is true?() A、 Compilation fails because the hashCode method is not overridden.B、 A HashSet could contain multiple Person objects with the same name.C、 All Person objects will have the same hash code because the hashCode method is not overridden.D、 If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.

考题 Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()A、It can be invoked only from the doGet or doPost methods.B、It can be used independently of the getRemoteUser method.C、Can return "true" even when its argument is NOT defined as a valid role name in the deployment descriptor.D、Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

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

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

考题 Which of the following statements about variables and their scopes are true? ()   A、 Instance variables are member variables of a class.B、 Instance variables are declared with the static keyword.C、 Local variables defined inside a method are created when the method is executed.D、 Local variables must be initialized before they are used.

考题 Which two statements are true regarding single row functions?()A、They accept only a single argument B、They can be nested only to two levels C、Arguments can only be column values or constants D、They always return a single result row for every row of a queried table E、They can return a data type value different from the one that is referenced

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

考题 多选题Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class?()AIf the hashCode values are different, the objects might be equal.BIf the hashCode values are the same, the object must be equal.CIf the hashCode values are the same, the objects might be equal.DIf the hashCode values are different, the objects must be unequal.

考题 多选题Part of the job as a network administrator is being able to make a distinction between routed protocols and routing protocols. Which of the following statements is true regarding them?()AA routing protocol is assigned to an interface and determines the method of packet delivery.BA routed protocol is assigned to an interface and determines the method of packet delivery.CA routing protocol determines the path of a packet through a network.DA routed protocol determines the path of a packet through a network.EA routing protocol operates at the transport layer of the OSI model.FA routed protocol updates the routing table of a router.

考题 单选题public class Person {  private name;  public Person(String name) {  this.name = name;  }  public boolean equals(Object o) {  if( !o instanceof Person ) return false;  Person p = (Person) o;  return p.name.equals(this.name);  }  }  Which is true?()A  Compilation fails because the hashCode method is not overridden.B  A HashSet could contain multiple Person objects with the same name.C  All Person objects will have the same hash code because the hashCode method is not overridden.D  If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.

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

考题 多选题Which of the following statements regarding routed and routing protocols are true?()AA routed protocol is assigned to an interface and determines the method of packet deliver.BA routing protocol determines the path of a packet through a network.CA routed protocol determines the path of a packet through a network.DA routing protocol operates at the transport layer of the OSI model.EA routed protocol updates the routing table of a router.

考题 单选题Which of the following statements is true concerning simple parallel resistance circuits?()A The total current flow equals the sum of the individual currentsB The total current flow equals the reciprocal of the sum of the individual currentsC The total resistance equals the sum of the individual resistanceD The total voltage equals the sum of the individual voltages across each resistance

考题 多选题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 about using the isUserInRole method to implement security in a Java EEapplication?()AIt can be invoked only from the doGet or doPost methods.BIt can be used independently of the getRemoteUser method.CCan return true even when its argument is NOT defined as a valid role name in the deployment descriptor.DUsing the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

考题 多选题Given that b and c refer to instances of wrapper classes, which two statements are true?()Ab.equals(b) returns true.Bb.equals(c) returns the same result as b == c.Cb.eqials(c) can return false even if c.equals(b) returns true.Db.equals(c) throws an exception if b and c are different wrapper types.Eb.equals(c) returns false if the type of wrapper objects being compared are different.

考题 多选题10. public class MyClass {  11.  12. public Integer startingI;  13. public void methodA() {  14. Integer i = new Integer(25);  15. startingI = i;  16. methodB(i);  17. }  18. private void methodB(Integer i2) {  19. i2 = i2.intValue();  20.  21. }  22. }  If methodA is invoked, which two are true at line 20?()Ai2 == startingI returns true.Bi2 == startingI returns false.Ci2.equals(startingI) returns true.Di2.equals(startingI) returns false.