Question: Which one of the following class declarations is a valid declaration of a class that cannot be instantiated? Select the one correct answer. (a) class
Which one of the following class declarations is a valid declaration of a class that cannot be instantiated?
Select the one correct answer.
(a) class Ghost { abstract void haunt(); }
(b) abstract class Ghost { void haunt(); }
(c) abstract class Ghost { void haunt() {}; }
(d) abstract Ghost { abstract void haunt(); }
(e) abstract class Ghost { abstract haunt(); }
Step by Step Solution
3.31 Rating (154 Votes )
There are 3 Steps involved in it
c Any nonfinal class can be declared as abstract A class ... View full answer
Get step-by-step solutions from verified subject matter experts
