General information
Category:
Object Oriented Programming
>Java interfaces (as well as C++ interfaces) are more an insurance for polymorphism than multiple inheritance (technically, classes don't inherit anything from interfaces). They are only a contract between programmer and compiler that certain methods will be there.
I think of them as contracts aswell. What is a C++ interface, The Java interface is semantically part of the language. C++ has no such thing. C++ templates are nice, but Java's single base object makes them unnecessary.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only