App Logo

No.1 PSC Learning App

1M+ Downloads
What is an abstract class in OOP?

AA class with no methods

BA class that cannot be instantiated

CA class that can only have private members

DMore than one of the above

Answer:

B. A class that cannot be instantiated

Read Explanation:

  • An abstract class in object-oriented programming (OOP) is a class that cannot be instantiated on its own and is meant to be subclassed by other classes.
  • It may contain abstract methods, which are methods without a body, and concrete methods with implementations.
  • Subclasses inheriting from an abstract class must provide implementations for the abstract methods, making it a way to enforce a common interface among multiple classes.

Related Questions:

MDI stands for:
Which of the following is an abstract data type?
In C++, when a class serves as a base class to others :
Compiler in a computer system is __________
A detailed written description of the programming cycle and the program, along with the test results and a printout of the program is called :