Review Questions


graphics/rq_icon.gif
10.1

What is the return type of the hashCode() method in the Object class?

Select the one correct answer.

  1. String

  2. int

  3. long

  4. Object

  5. Class

10.2

Which statement is true?

Select the one correct answer.

  1. If the references x and y denote two different objects, then the expression x.equals(y) is always false .

  2. If the references x and y denote two different objects, then the expression (x.hashCode() == y.hashCode()) is always false .

  3. The hashCode() method in the Object class is declared final .

  4. The equals() method in the Object class is declared final .

  5. All arrays have a method named clone .

10.3

Which exception can the clone() method of the Object class throw?

Select the one correct answer.

  1. CloneNotSupportedException

  2. NotCloneableException

  3. IllegalCloneException

  4. NoClonesAllowedException



A Programmer[ap]s Guide to Java Certification
A Programmer[ap]s Guide to Java Certification
ISBN: 201596148
EAN: N/A
Year: 2003
Pages: 284

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net