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

1 Expert Approved Answer
Step: 1 Unlock

c Any nonfinal class can be declared as abstract A class ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!