I know about C++ pure virtual classes, but Java went one step further and created a first-class (no pun intended) concept for multiple-interface (not implementation) inheritance, the interface
. It's now a staple of major statically-typed languages. Did Java invent the interface concept? Or did it appear in older languages also as a first-class concept?
Here is abstract from the article The Java Language Environment.
An interface in the Java language is simply a specification of methods that an object declares it implements. An interface does not include instance variables or implementation code--only declarations of constants and methods. The concept of an interface in the Java language was borrowed from the Objective-C concept of a protocol.
http://java.sun.com/docs/white/langenv/Object.doc2.html#6185
As far as I know Objective-C was the first language to feature interfaces. At least it had them before Java was invented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With