Challenger App

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:

.NET applications written in the high level programming language are compiled into a language-agnostic:
Find the odd one out :
In VB, Option button can be grouped in a. ............ control.
In C++, the number 135, 45 is a :