In Java, what is a Base Class?

2024

In Java, what is a Base Class?

  1. A.

    A class that is used as a template to create other classes and can be instantiated directly.

  2. B.

    A class that is used as a foundation for other classes to inherit properties and methods.

  3. C.

    A class that contains only static methods and variables.

  4. D.

    A class that cannot be inherited by other classes and is only used for creating objects.

  5. E.

    Question not attempted

Attempted by 85 students.

Show answer & explanation

Correct answer: B

A base class is the parent or foundation class from which other classes can inherit properties and methods.

Explore the full course: Up Lt Grade Assistant Teacher 2025