C and D could be both correct. However, in the code fragment we are creating object of class Ebook thus, it cannot be abstract.
Thus, the correct answer is (D)
D - As concrete class will need to implement unimplemented interface method.
Java Abstract class can implement interfaces without even providing the implementation of interface methods
The answer is letter D, answers A and B are clearly wrong, C would also be right, but what shows that it is wrong is the code fragment that calls the class directly. You cannot instantiate abstract classes directly as it was done in the code snippet, so the letter D is correct, implement the abstracted method.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
vic88
1 week, 6 days agogg7495
1 year, 2 months agoVicky_65
1 year, 8 months agoAnkit1010
1 year, 10 months agowillokans
2 years agoDef8
2 years, 1 month agoiSnover
2 years, 1 month agoHamiltonValerio
2 years, 1 month ago