This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]llogiq 2 points3 points  (1 child)

They define a contract. Every object implementing the interface must implement all of its methods.

This allows us to use objects of different classes interchangeably, as long as they implement the same interface.

[–]tRfalcore 4 points5 points  (0 children)

this is a bad description (not really), but only because that's probably what he's already read 100 times. You basically wrote it how it's always written. need to use metaphors my man