У нас вы можете посмотреть бесплатно What is Interface in Kotlin Why implement Interface? Delegation in Interface или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Independent classes can have common behavior If two classes fail the IS-A test, this indicates that they probably don’t belong in the same superclass hierarchy. When you have independent classes that exhibit common behavior, you can model this behavior using an interface. An interface lets you define common behavior OUTSIDE a superclass hierarchy. Interfaces are similar to abstract classes in that they can’t be instantiated, and they can define abstract or concrete functions and properties, but there’s one key difference: a class can implement multiple interfaces, but can only inherit from a single direct superclass. Interface functions can be abstract or concrete. Just like abstract super classes, any concrete classes that implement the interface must have a concrete implementation for any abstract properties and functions. Concrete classes can’t contain abstract properties and functions, so they must implement all of the abstract properties and functions that they inherit. Delegation: Interfaces are useful, but if your interface contains many functions, its child classes can end up with a lot of boilerplate code. If you only want to override a small part of a class's behavior, you need to repeat yourself a lot. Boilerplate code is a chunk of code that is reused with little or no alteration in multiple parts of a software project. In Kotlin, you can delegate the interface implementation to a class instance using the by keyword. Telegram Group: https://t.me/androidNinjaWarrior Guide to watch: 00:21 What is interface? 04:25 How to create interface in kotlin? 08:30 How to implement an interface in kotlin? 14:44 How to Delegate an interface in kotlin? 21:40 How to handle naming conflict in Interface in kotlin? 25:09 Revision of Abstract and Interface in kotlin? #Interface #Delegation #DelegateInterface #MultipleInheritance #Polymorphism #Kotlin #KotlinCourse Disclaimer- Some content are used for educational purposes under fair use. Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational, or personal use tips the balance in favor of fair use. All credit for copyright material used in the video goes to the respected Owner. Thank you guys.