Created
November 14, 2017 23:42
-
-
Save arkilis/e1ff8d09c630c88193c45f63a8e074e2 to your computer and use it in GitHub Desktop.
kotlin variable & methods
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 KotlinClass { | |
companion object { | |
val staticVariable = 1 | |
fun staticMethod():String { return "some string" } | |
} | |
} | |
KotlinClass.staticVariable // static variable | |
KotlinClass.staticMethod() // static methods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment