Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Last active May 29, 2018 08:49
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 tmaxxdd/b996f55509378c7cdc840562e473cfd3 to your computer and use it in GitHub Desktop.
Save tmaxxdd/b996f55509378c7cdc840562e473cfd3 to your computer and use it in GitHub Desktop.
class Example {
private lateinit var text: String
fun initialize() {
text = "Nadaje wiadomosc"
}
fun readText(): String {
if (::text.isInitialized) {
return text
}
return "Brak wiadomosci"
}
}
fun main(args: Array<String>) {
val klasa = Example()
//klasa.initialize()
print(klasa.readText())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment