Single Choice Easy

QWhat is an abstract class in Java?

ID: #10336 Abstract class and method 120 views
Question Info
#10336Q ID
EasyDifficulty
Abstract class and methodTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A An abstract class is a class that cannot be instantiated and can only be inherited.
  • B An abstract class is a class that can be instantiated but cannot be inherited.
  • C An abstract class is a class that can only contain abstract methods.
  • D An abstract class is a class that can only contain static methods.
Correct Answer

Explanation

An abstract class is a class that cannot be instantiated and can only be inherited. It is a class that is declared with the abstract keyword and may contain both abstract and non-abstract methods. Abstract classes cannot be instantiated, and it is designed to be inherited by other classes. Abstract classes may contain static data members.

Share This Question

Challenge a friend or share with your study group.