How to create static methods in Kotlin?
Answer / Rajesh Kumar Roy
To create a static method in Kotlin, you should use the companion object. A companion object contains all static members for a class.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the major features of Kotlin?
What is Kotlin’s target platform? Is Java-kotlin interoperability possible?
what operator is used to handle null exceptions in Kotlin?
What are the advantage of using Kotlin ?
Give me name of the extension methods Kotlin provides to java.io.File
Describe the use of extension function?
Does Kotlin support Checked Exceptions like in Java?
How can data class be used in Kotlin?
How do you declare a variable as volatile in Kotlin ?
How to compare two strings in Kotlin?
When instruction in Kotlin are executed ?
Is there Ternary Conditional Operator in Kotlin like in Java ?