多选题public class Key {  private long id1;  private long 1d2;  // class Key methods  }  A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works corre

题目
多选题
public class Key {  private long id1;  private long 1d2;  // class Key methods  }  A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()
A

public int hashCode()

B

public boolean equals(Key k)

C

public int compareTo(Object o)

D

public boolean equals(Object o)

E

public boolean compareTo(Key k)


相似考题
更多“多选题public class Key {  private long id1;  private long 1d2;  // class Key methods  }  A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works corre”相关问题
  • 第1题:

    Which statement is true about a certificate authority?()

    • A、An entity responsible for registering the private key encryption used in a PKI
    • B、An agency responsible for granting and revoking public-private key pairs
    • C、A trusted third party responsible for signing the public keys of entities in a PKIbased system
    • D、A trusted third party responsible for signing the private keys of entities in a PKIbased system

    正确答案:C

  • 第2题:

    public class Person {  private name;  public Person(String name) {  this.name = name;  }  public int hashCode() {  return 420;  }  }  Which is true?() 

    • A、 The time to find the value from HashMap with a Person key depends on the size of the map.
    • B、 Deleting a Person key from a HashMap will delete all map entries for all keys of typePerson.
    • C、 Inserting a second Person object into a HashSet will cause the first Person object to beremoved as a duplicate.
    • D、 The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.

    正确答案:A

  • 第3题:

    public class X {  public X aMethod() { return this;}  }  public class Y extends X {  }  Which two methods can be added to the definition of class Y?()

    • A、 public void aMethod() {}
    • B、 private void aMethod() {}
    • C、 public void aMethod(String s) {}
    • D、 private Y aMethod() { return null; }
    • E、 public X aMethod() { return new Y(); }

    正确答案:C,E

  • 第4题:

    public class Key {  private long id1;  private long 1d2;  // class Key methods  }  A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()

    • A、 public int hashCode()
    • B、 public boolean equals(Key k)
    • C、 public int compareTo(Object o)
    • D、 public boolean equals(Object o)
    • E、 public boolean compareTo(Key k)

    正确答案:A,D

  • 第5题:

    Which two statements about the Diffie-Hellman (DH) key exchange process are correct?()

    • A、In the DH key exchange process, the session key is never passed across the network.
    • B、In the DH key exchange process, the public and private keys are mathematically related using the DH algorithm.
    • C、In the DH key exchange process, the session key is passed across the network to the peer for confirmation.
    • D、In the DH key exchange process, the public and private keys are not mathematically related, ensuring higher security

    正确答案:A,B

  • 第6题:

    Which two statements regarding asymmetric key encryption are true?()

    • A、The same key is used for encryption and decryption.
    • B、It is commonly used to create digital certificate signatures.
    • C、It uses two keys: one for encryption and a different key for decryption.
    • D、An attacker can decrypt data if the attacker captures the key used for encryption

    正确答案:A,B

  • 第7题:

    You are developing a Windows Presentation Foundation (WPF) application The application is for commercial use and requires a valid license key to be entered. You create a project type of Class Library code to validate license keys You need to ensure that the user enters a valid license key during installation of the software. Which deployment should reference the class library?()

    • A、 Click Once
    • B、 Setup Project
    • C、 XBAP
    • D、 XCopy

    正确答案:B

  • 第8题:

    PKI的全称是()。

    • A、Private Key Intrusion
    • B、Public Key Intrusion
    • C、Private Key Infrastructure
    • D、Public Key Infrastructure

    正确答案:D

  • 第9题:

    多选题
    Which two statements regarding asymmetric key encryption are true?()
    A

    The same key is used for encryption and decryption.

    B

    It is commonly used to create digital certificate signatures.

    C

    It uses two keys: one for encryption and a different key for decryption.

    D

    An attacker can decrypt data if the attacker captures the key used for encryption


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

  • 第10题:

    单选题
    Which statement is true about a certificate authority?()
    A

    An entity responsible for registering the private key encryption used in a PKI

    B

    An agency responsible for granting and revoking public-private key pairs

    C

    A trusted third party responsible for signing the public keys of entities in a PKIbased system

    D

    A trusted third party responsible for signing the private keys of entities in a PKIbased system


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

  • 第11题:

    多选题
    Which two statements about the Diffie-Hellman (DH) key exchange process are correct? ()(Choose two.)
    A

    In the DH key exchange process, the session key is never passed across the network.

    B

    In the DH key exchange process, the public and private keys are mathematically related using the DH algorithm.

    C

    In the DH key exchange process, the session key is passed across the network to the peer for confirmation.

    D

    In the DH key exchange process, the public and private keys are not mathematically related, ensuring higher security


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

  • 第12题:

    多选题
    Which two statements regarding symmetric key encryption are true?() (Choose two.)
    A

    The same key is used for encryption and decryption.

    B

    It is commonly used to create digital certificate signatures.

    C

    It uses two keys: one for encryption and a different key for decryption.

    D

    An attacker can decrypt data if the attacker captures the key used for encryption.


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

  • 第13题:

    Which of the following authenticates a web server to the remote client in PKI?()

    • A、FQDN
    • B、DNS name
    • C、Public key
    • D、Private key

    正确答案:C

  • 第14题:

    PKI是()。

    • A、Private Key Infrastructure
    • B、Public Key Institute
    • C、Public Key Infrastructure公钥基础设施
    • D、Private Key Institute

    正确答案:C

  • 第15题:

    public class Parent {     int change() {…}     }  class Child extends Parent {     }  Which methods can be added into class Child?()    

    • A、 public int change(){}
    • B、 int chang(int i){}
    • C、 private int change(){}
    • D、 abstract int chang(){}

    正确答案:A,B

  • 第16题:

    Which two statements about the Diffie-Hellman (DH) key exchange process are correct? ()(Choose two.)

    • A、In the DH key exchange process, the session key is never passed across the network.
    • B、In the DH key exchange process, the public and private keys are mathematically related using the DH algorithm.
    • C、In the DH key exchange process, the session key is passed across the network to the peer for confirmation.
    • D、In the DH key exchange process, the public and private keys are not mathematically related, ensuring higher security

    正确答案:A,B

  • 第17题:

    Which two statements regarding symmetric key encryption are true?() (Choose two.)

    • A、The same key is used for encryption and decryption.
    • B、It is commonly used to create digital certificate signatures.
    • C、It uses two keys: one for encryption and a different key for decryption.
    • D、An attacker can decrypt data if the attacker captures the key used for encryption.

    正确答案:A,D

  • 第18题:

    Which three statements are true?()

    • A、A final method in class X can be abstract if and only if X is abstract.
    • B、A protected method in class X can be overridden by any subclass of X.
    • C、A private static method can be called only within other static methods in class X.
    • D、A non-static public final method in class X can be overridden in any subclass of X.
    • E、A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
    • F、A method with the same signature as a private final method in class X can be implemented in a subclass of X.
    • G、A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.

    正确答案:B,E,F

  • 第19题:

    You need to select a class that is optimized for key-based item retrieval from both small and large collections. Which class should you choose?()

    • A、OrderedDictionary class
    • B、HybridDictionary class
    • C、ListDictionary class
    • D、Hashtable class

    正确答案:B

  • 第20题:

    PKI是()。

    • A、Private Key lnfrastructure
    • B、Public Key lnstitute
    • C、Public Key lnfrastructure
    • D、Private Key lnstitute

    正确答案:C

  • 第21题:

    单选题
    You are developing a method to decrypt data that was encrypted with the Triple DES Algorithm. The method accepts the following parameters:  The byte array to be decrypted, which is named cipherMessage  The key, which is named key   An initialization vector, which is named iv  You need to decrypt the message by using the TripleDES class and place the result in a string.  Which code segment should you use?()
    A

    A

    B

    B

    C

    C

    D

    D


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

  • 第22题:

    多选题
    Which two statements about the Diffie-Hellman (DH) key exchange process are correct?()
    A

    In the DH key exchange process, the session key is never passed across the network.

    B

    In the DH key exchange process, the public and private keys are mathematically related using the DH algorithm.

    C

    In the DH key exchange process, the session key is passed across the network to the peer for confirmation.

    D

    In the DH key exchange process, the public and private keys are not mathematically related, ensuring higher security


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

  • 第23题:

    多选题
    Which three statements are true?()
    A

    A final method in class X can be abstract if and only if X is abstract.

    B

    A protected method in class X can be overridden by any subclass of X.

    C

    A private static method can be called only within other static methods in class X.

    D

    A non-static public final method in class X can be overridden in any subclass of X.

    E

    A public static method in class X can be called by a subclass of X without explicitly referencing the class X.

    F

    A method with the same signature as a private final method in class X can be implemented in a subclass of X.

    G

    A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.


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