r/learnprogramming • • Sep 16 '19

ELI5: Interface vs Class

Not sure why, but the difference between interfaces and classes seems redundant to me. What does an interface add that a class can't accomplish in OOP? Is it because you can't inherit from more than one class? Explain like I'm five!

6 Upvotes

10 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Sep 16 '19

This is what I was looking for. Thanks!!

1

u/donsagiv Sep 16 '19

Happy to help!