kevinmost
08/01/2017, 4:27 AMvar foo: String? = null, then set it in your method
2) lateinit var: lateinit var foo: String, then set it in your method. Note that accessing this variable before it's set results in a runtime exception
3) Best option if you don't need any state from your methods: lazy val: val foo by lazy { computeString() }