Java OCA OCP Practice Question 1994

Question

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

Select the two correct answers.

  • (a) java.lang.Float
  • (b) java.lang.Byte
  • (c) java.lang.Character
  • (d) java.lang.Boolean
  • (e) java.lang.Short


(c) and (d)

Note

The classes Character and Boolean are non-numeric wrapper classes and they do not extend the Number class.

The classes Byte, Short, Integer, Long, Float, and Double are numeric wrapper classes that extend the Number class.




PreviousNext

Related