Skip to content

Instantly share code, notes, and snippets.

@arkilis
Created November 14, 2017 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arkilis/e1ff8d09c630c88193c45f63a8e074e2 to your computer and use it in GitHub Desktop.
Save arkilis/e1ff8d09c630c88193c45f63a8e074e2 to your computer and use it in GitHub Desktop.
kotlin variable & methods
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