Table of Contents
Interface Declaration
Return to Interface definition
Declaration: Definitions vs Declarations, Definitions and Declarations (computer programming): Type declaration - User-defined type declaration, Variable declaration - Constant declaration, Class declaration - Object declaration, Constructor declaration - Destructor declaration, Struct declaration - Record declaration, Function declaration - Method declaration, Lambda declaration - Anonymous function declaration, Enumerator declaration, Pointer declaration, Generic declaration - Template declaration, Interface declaration - Protocol declaration - Trait declaration, Namespace declaration, Package declaration, Module declaration, Alias declaration, Import declaration - Export declaration, Macro declaration. Programming terms. (navbar_declaration)
- Snippet from Wikipedia: Interface (object-oriented programming)
In object-oriented programming, an interface or protocol type is a data type that acts as an abstraction of a class. It describes a set of method signatures, the implementations of which may be provided by multiple classes that are otherwise not necessarily related to each other. A class which provides the methods listed in an interface is said to implement the interface, or to adopt the protocol.
Interfaces are useful for encapsulation and reducing coupling. For example, in Java, the
java.lang.Comparable<T>interface specifies the methodcompareTo(). Thus, a sorting method only needs to take objects of types which implementjava.lang.Comparable<T>to sort them, without knowing about the inner nature of the class (except that two of these objects can be compared viacompareTo()).
Language Specifics
1. Bash Scripting
2. C Language
3. C++
4. C#
5. Clojure
6. COBOL
- COBOL interface declaration on IBM.com/docs
7. Dart
8. Elixir
9. Fortran
- Fortran interface declaration on IBM.com/docs
10. Go
11. Groovy
12. Haskell
13. IBM REXX
- REXX interface declaration on IBM.com/docs
14. IBM JCL
- JCL interface declaration on IBM.com/docs
15. Java
16. JavaScript
17. Kotlin
18. PHP
19. PowerShell
20. Python
21. Ruby
22. Rust
23. Scala
24. Swift
25. Microsoft T-SQL
26. TypeScript
Search
Also Listed As
Cloud Monk is Retired ( for now). Buddha with you. © 2025 and Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.
