An interface is a reference type, similar to a class that can contain only constants, method signatures, and nested types. There are no method bodies. Interfaces cannot be instantiated—they can only be implemented by classes or extended by other interfaces. They act as a skeleton for implementing classes specifying what to implement and not how to implement them.
Interfaces add most of the functionality that is required for many applications which would normally resort to using multiple inheritance in a language such as C++.
No comments:
Post a Comment