Computer Science, asked by dhanraj1615, 1 year ago

Which of the following is/are true for an abstract class?
1. A class is declared abstract by prefacing the definition with the word abstract.
2. A class is declare abstract by using the keyword implements.
3. It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
4. Attempting to instantiate an abstract class results in an error.
A.Only 2
B.All of the mentioned
C.2 and 4
D.2, 3 and 4

Answers

Answered by StarGazer001
2
heya !

option A is the answer

A class is declare abstract by using the keyword implements.

hope this helps you
Answered by anjalin
0

A. Only 2 is/are true for an abstract class.

Explanation for the answer:

  • The correct statement is: A class is declared abstract by using the keyword implements.
  • An abstract class allows you to prepare functionality which subclasses can implement or override.
  • An interface allows you to specify functionality, not implement it.
  • All the rest statements are not true expect the 2 one.
  • Hence, the correct answer among all the options is option A. Only 2.

(#SPJ3)

Similar questions