How to extend and implement at the same time in Kotlin?

Posted by Jennifer | Updated on

Want to extend and implement at the same time in Kotlin? There’s no syntactic difference between interface implementation and class inheritance. Simply list all types comma-separated after a colon : as shown here:

Multiple class inheritance is prohibited while multiple interfaces may be implemented by a single class.

Reference:
https://stackoverflow.com/questions/48391217/extend-and-implement-at-the-same-time-in-kotlin


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers