The figure below depicts the hierarchy of ____ class.

2013

The figure below depicts the hierarchy of ____ class.

image.pngimage.png

Answer: D. AbstractThe figure shows java.lang.Number declared as an abstract class (labelled "<abstract> Number") with subclasses Byte, Short, Integer, Long, Float, and Double.…

  1. A.

    Heap

  2. B.

    Wrapper

  3. C.

    Inheritance

  4. D.

    Abstract

Attempted by 122 students.

Show answer & explanation

Correct answer: D

The figure shows java.lang.Number declared as an abstract class (labelled "<abstract> Number") with subclasses Byte, Short, Integer, Long, Float, and Double. Character, Boolean, and Void are shown separately under Object as other wrapper classes.

  • Abstract class: Declared with the abstract modifier and cannot be instantiated.

  • Abstract methods: If a class defines one or more abstract methods, the class itself must be declared abstract.

  • Subclasses shown: Byte, Short, Integer, Long, Float, and Double are numeric wrapper classes that extend Number and are shown as its subclasses in the diagram.

  • Conclusion: The hierarchy depicted is of an abstract class (Number), so 'abstract' is the correct answer.

Explore the full course: Rssb Basic Computer Instructor

Loading lesson…