Last active
March 31, 2018 09:58
-
-
Save ashwin-sp/6382d127e49133b27827c1c7bdc9418e to your computer and use it in GitHub Desktop.
Companion member reference from a java file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test | |
{ | |
companion object { | |
val num: Int = 1 | |
fun call() | |
{ | |
println("Calling companion") | |
} | |
} | |
} | |
/** Equivalent Java reference | |
Test.Companion.call(); | |
Test.Companion.getNum(); | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment