In Java, what is a Base Class?
2024
In Java, what is a Base Class?
- A.
A class that is used as a template to create other classes and can be instantiated directly.
- B.
A class that is used as a foundation for other classes to inherit properties and methods.
- C.
A class that contains only static methods and variables.
- D.
A class that cannot be inherited by other classes and is only used for creating objects.
- 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.