Logo InterviewVault

Welcome back, Sujit Kumar Mishra

SKM

Revision Mode

Document technical questions and best-practice answers.

Cancel

Do we have a return type for Abstract class and for Interface? 

No, abstract classes and interfaces themselves do not have a "return type."


1: Abstract Class: The methods inside an abstract class can have return types, but the abstract class itself does not.

2: Interface: Similarly, the methods inside an interface can have return types, but the interface itself does not.


Remember:

Return type is for methods/functions, not for classes or interfaces themselves.

Ready for commit