Interfaces are a fundamental concept in Kotlin, they empower you to write code that’s flexible, adaptable, and easily reusable. Furthermore, they enable you to model behavior that isn’t connected to inheritance. They share similar behavior with something called an “Abstract Class.” You use them to share behavior between different subclasses. But in Kotlin, a class can inherit from just one parent class. However, classes can adopt multiple interfaces, allowing you to create your types to suit specific needs.
In this lesson, you’ll:
Describe the difference between Abstract Classes and Interfaces
Identify the importance of programming to abstractions versus coding to implementations
Explain the roles of Abstract Classes and Interfaces in writing software
Dive into the world of Interfaces, exploring their definition, their real-world applications and how they enable you to create code that conforms to specific contracts. By the end, you’ll have a solid introduction to Interfaces and how to leverage them to enhance your Android development skills.
See forum comments
This content was released on May 22 2024. The official support period is 6-months
from this date.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.