Can anyone point me to good articles regarding int...
# announcements
Can anyone point me to good articles regarding interfaces? I’m finding it pretty difficult to grasp the concept !! 😫
Do you want to use `interface`s for a specific use case? Also, did you check the `interface`s provided in the stdlib like
and more? There are use cases for interfaces beyond that, but it might help you.
I assume the question is about the concept of interface in a class based language. Unforntunately, kotlin documentation for interfaces ( assumes you already know what an interface is. As to grasping this context I would start by learning what a Java interface is (e.g., or corresponding chapter in ). And then, you can learn how kotlin interfaces are much more powerful. Note there may be better explanations (than those example links I provide) about what a Java interface is.
Thank you for your responses ! Yes I’m just starting out so I just wanted to know what makes interfaces special and use cases when an interface is more relevant rather than a class or an abstract class. I’ll go through the links that you have provided. Thanks for hearing me out !
abstract classes can hold a state (have fields), but you lose the ability to to inherit another class at implementation site.