Interface conflicts

- [Man] In Kotlin, when working with interfaces…you can sometimes have multiple interfaces.…And there are some ways to work with conflicts…that happen when you have similar method signatures.…So let's come down into the interface conflicts…and start creating an example of when a conflict…would happen and how we can resolve it.…So first, we're going to make a new interface…and we'll call this the database interactor.…We'll say, fun load family.…

In this case I'll just do something fake & say, print "A".…And then I'll say, load friends, and leave it to…whoever implements this interface to implement…that actual method.…And now we'll say, another interface database helper.…And we'll say fun load family, you can see that…the name is exactly the same and the signature is.…

And I'll say, loading family.…Fun load friends.…And in this case, we have a default implementation.…Loading all friends.…And we'll make a class.…This one will be the simple database interaction.…And then it'll get the database interactor.…

Implement members and we'll say,…

Resume Transcript Auto-Scroll

Author

Released

10/26/2017

Now that Google has embraced Kotlin—making it an official language on Android— cross-platform development has become a lot simpler. The striking similarities between Swift and Kotlin make maintaining an app across iOS and Android more intuitive. In this course, discover how to leverage your Swift knowledge to learn Kotlin. Instructor Jon Bott covers the basics of Kotlin, highlighting the similarities and differences between Kotlin and Swift by looking at Swift code examples and walking through how to code Kotlin equivalents. He also demonstrates how to work with different database options, and provides an opportunity for you to get hands-on experience using your iOS knowledge to construct an Android UI.