Review Questions

graphics/rq_icon.gif

10.4

Which of the following are wrapper classes?

Select the three correct answers.

  1. java.lang.Void

  2. java.lang.Int

  3. java.lang.Boolean

  4. java.lang.Long

  5. java.lang.String

10.5

Which of the following classes do not extend the java.lang.Number class?

Select the two correct answers.

  1. java.lang.Float

  2. java.lang.Byte

  3. java.lang.Character

  4. java.lang.Boolean

  5. java.lang.Short

10.6

Which of these classes define immutable objects?

Select the three correct answers.

  1. Character

  2. Byte

  3. Thread

  4. Short

  5. Object

10.7

Which of these classes have a one-parameter constructor taking a string?

Select the two correct answers.

  1. Void

  2. Integer

  3. Boolean

  4. Character

  5. Object

10.8

Which of the wrapper classes have a booleanValue() method?

Select the one correct answer.

  1. All wrapper classes.

  2. All wrapper classes except Void.

  3. All wrapper classes that also implement the compareTo() method.

  4. All wrapper classes extending Number.

  5. Only the class Boolean.

10.9

Which statements are true about wrapper classes?

Select the two correct answers.

  1. String is a wrapper class.

  2. Double has a compareTo() method.

  3. Character has a intValue() method.

  4. Byte extends Number.



     
    ASPTreeView.com
     
    Evaluation has ЅВ·expired.
    Info...