Static extension methods in Kotlin

Posted by Andre Scott | Updated on

Static extension methods in Kotlin. To achieve Uber.doMagic(context), you can write an extension to the companion object of Uber (the companion object declaration is required):


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