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:

Which of these is not a programming language?
A programme in a personal computer that manages data flow from the computer's operating system and attached devices such as hard disk, key board, mouse and printer?
Which key is used in combination with another key to perform a specific task?
Variables appearing in the header of a function procedure (VB) are called :
In C++, variables that hold memory addresses are called :